Create
Audience APIs allow brands to Create, Update, Replace, Remove, List and View Audiences.
Audiences are lists of Custom User IDs that can be used for targeting with Batch Platform, when performing Email Campaigns and Automations.
Audiences can also be associated with attributes that can be used for personalization purposes (more information here).
API Description
Create an audience.
The unique project key, identifying a project on the Batch platform
project_0664hxvwffvbpn278gxdyhsadddqgna6
The audience name value must be a string that only contains letters (a-z, A-Z), numbers (0-9) or the following characters : _, -. Audience names can be up to 255 characters long. They are case sensitive.
Request structure
Route
The Audience API exposes a POST endpoint that allows to create an audience:
https://api.batch.com/2.4/audiences/create
Headers and authentication
See Overview → Using Project APIs.
Post data
The body of the request must contain a valid JSON payload describing the operations to be executed on the audience.
Here is a how a complete JSON payload looks like:
Responses
Success
If the POST to the API endpoint is successful you will receive an HTTP 202 confirmation and a token.
Once you get your token, you can use it to check the indexing state of this update with the API.
Failure
If the POST data does not meet the API requirements you will receive an actionable error message. Contact us at [email protected] if you need further support.
Last updated
Was this helpful?