Skip to content
API

Create Audience

POST
/v1/audiences

Create an audience.

Authentication

Topsort’s APIs are authenticated via bearer tokens. Requests must include an authorization header containing your private API key.

Don't have an API key yet? Learn how to generate one.

Authorization
required
string

The header containing a private API key. Format this header as follows:

Authorization: Bearer <YOUR-API-KEY>

Request Body

Audiences to create.

application/json
object
audiences
required

Audiences to create.

object
key
additional properties
Array<string>

Responses

Successful Response

Response to creating an audience. Contains a list of created audiences.

application/json
object
audiences
required

Created audiences.

Array<object>

Represents an audience.

object
audienceKey
required

Unique identifier for categorizing audiences.

string
>= 2 characters <= 25 characters /^\w+$/
audienceValues
required

List of specific values under this category.

Array<string>
>= 1 items
createdAt
required

Datetime of when the audience was created.

string format: date-time
updatedAt
required

Datetime of the audience’s last update.

string format: date-time