GET - List

See create to see an introduction about Audience API.

API Description

This API schema is available in the OpenAPI 3.1 format: View it online.

Request structure

Route

The Audience API exposes a GET endpoint that allows to list audiences :

https://api.batch.com/2.3/audiences/list

Headers and authentication

See Overview → Using Project APIs.

Query parameters

IdDescription
fromString - Optional for the first call
Value used for pagination, it’s an opaque value returned by a previous call to list (next_from).
E.g."/audiences/list?from=676DEZREZ"
limitInteger - Optional, Default : 10, Max : 100
Value that indicates the number of audiences to be returned per API call.
E.g."/audiences/list?limit=20"

Responses

Success

If the GET to the API endpoint is successful you will receive an HTTP 200 confirmation and information about your audiences.

{
  "audiences": [
    {
      "name": "string",
      "display_name": "string",
      "type": "CUSTOM_ID",
      "nb_ids": 0,
      "indexing_state": "APPLIED",
      "created": "2023-08-12T22:30:05Z",
      "updated": "2023-08-12T22:30:05Z"
    }
  ],
  "count": 4012,
  "has_more": true,
  "next_from": "676DEZREZ"
}

3 values are possible for indexing state

  • IN_PROGRESS : update processing is in progress
  • APPLIED : update processing is finished
  • REPLACED : the audience content has been replaced since the issue of the indexing token.

Pagination infos:

  • next_from can be used for the next call to list to retrieve the next page
  • count is only returned for the first page

Failure

If the POST data does not meet the API requirements you will receive an actionable error message. Contact us at support@batch.com if you need further support.

See the list of potential failures in the specification.