Skip to content
API

Get Audiences

GET
/v1/audiences

Get audiences.

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>

Query Parameters

object
next_page

A token provided in a previous response. If not empty, it is used to retrieve the page that follows.

string

A token provided in a previous response. If not empty, it is used to retrieve the page that follows.

limit

The maximum number of audiences to retrieve.

integer
default: 100 <= 100

The maximum number of audiences to retrieve.

Responses

Successful Response

Paginated list of audiences.

application/json
object
audiences
required

List of 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
hasMore
required

Whether this is the last page of results or not.

boolean
nextPage

A token to retrieve the next page of results.

string
>= 1 characters