Remove
See create to see an introduction about Audience API.
API Description
Delete an audience.
The unique project key, identifying a project on the Batch platform
project_0664hxvwffvbpn278gxdyhsadddqgna6
The name of the existing audience you want this operation to be applied to.
If the POST to the API endpoint is successful you will receive an HTTP 202 confirmation and an indexing token. Once you get your indexing token, you can use it to check the indexing state with the view action.
The request is malformed
The Rest API Key is not valid for this project
Too Many Requests
Unexpected error
Batch's services are under maintenance. Please try again later
POST /2.6/audiences/remove HTTP/1.1
Host: api.batch.com
Authorization: Bearer YOUR_SECRET_TOKEN
X-Batch-Project: text
Content-Type: application/json
Accept: */*
Content-Length: 24
{
"name": "AUDIENCE_NAME"
}
{
"indexing_token": "text"
}
Request structure
Route
The Audience API exposes a POST endpoint that allows to delete a audience :
/audiences/remove
NOTE: If the deleted audience is already used as a campaign targeting, Batch will consider it as an empty audience.
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:
{
"name": "AUDIENCE_NAME"
}
Responses
Success
If the call to the API endpoint is successful you will receive an HTTP 202 confirmation.
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 API Description.
Last updated