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

The subscribe Ortto endpoint of the audiences 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/audiences/subscribe

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
{
  "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