Subscribe or unsubscribe people to/from an audience (subscribe)

The subscribe Ortto endpoint of the audience entity is used to retrieve subscription statuses from one or more person records in Ortto’s customer data platform (CDP).

This page provides descriptions of this endpoint’s:


HTTP method and request resource

PUT https://api.ap3api.com/v1/audience/subscribe

NOTE: Ortto customers who have their instance region set to Australia or Europe will need to use specific service endpoints relative to the region:

  • Australia: https://api.au.ap3api.com/
  • Europe: https://api.eu.ap3api.com/

For example: https://api.eu.ap3api.com/v1/<entity/endpoint>

All other Ortto users will use the default service endpoint (https://api.ap3api.com/).


Path and query parameters

This endpoint takes no additional path and/or query parameters.


Headers

This endpoint requires a custom API key and content type (application/json for the request body) in the header of the request:

  • X-Api-Key: CUSTOM-PRIVATE-API-KEY
  • Content-Type: application/json

Request body

The request body consists of a JSON object whose valid elements are listed in the table below.

The following JSON object is an example of field and object data that Ortto can recognize to get data from one or more person records in your Ortto account’s CDP.

Example subscription status request body from Ortto’s CDP

json

{ "audience_id": "61380ac92593ecf2de4fd705", "people": [ { "email": "person1@example.com", "subscribed": true }, { "email": "person2@example.com", "subscribed": false } ], "async": true }

Valid request body elements

The following table lists all valid request body elements (arrays, objects, or fields), which are available to this endpoint.

Element

Type

Description

audience_id

string



persons

array of objects