Remove

See create to see an introduction about Audience API.

API Descriptionn

Remove

post

Delete an audience.

Authorizations
Header parameters
X-Batch-Projectstringrequired

The unique project key, identifying a project on the Batch platform

Example: project_0664hxvwffvbpn278gxdyhsadddqgna6
Body
namestringrequired

The name of the existing audience you want this operation to be applied to.

Responses
application/json
objectoptional
post
POST /2.4/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 :

https://api.batch.com/2.4/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 [email protected] if you need further support.

See the list of potential failures in the API Description.

Last updated

Was this helpful?