GET - View

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 get information about a audience :

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

Headers and authentication

See Overview → Using Project APIs.

Query parameters

IdDescription
nameString - Required
The name of the audience to view.
E.g."AUDIENCE_NAME"
indexing_tokenString - Optional
The indexing token returned by the replace and update routes.
E.g."/audiences/view?indexing_token=INDEXING_TOKEN"

Responses

Success

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

{
  "name": "string",
  "display_name": "MBE123",
  "type": "CUSTOM_ID",
  "nb_ids": 2,
  "indexing_state": "APPLIED",
  "created": "2023-10-03T09:35:08Z",
  "updated": "2023-10-03T09:35:08Z"
}

The indexing state is the indexing state of the update that returned the given indexing token. If there is no indexing token provided, the state of the last update will be used.
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.

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.