Skip to the documentation
API

Delete an audience

Deletes the audience and drops every membership it held, in one transaction. The contacts themselves are not touched: they stay in the address book, in the default audience, and in any other audience they were in.

DELETE/audiences/{id}

Runs the real call on your workspace.

DELETE /audiences/{id}

Deletes the audience and drops every membership it held, in one transaction. The contacts themselves are not touched: they stay in the address book, in the default audience, and in any other audience they were in.

Example

Needs audiences:write.

curl
curl -X DELETE "$OE/audiences/aud_4c1b8e2a7d9f05c36b4e8a71" -H "$AUTH"
Response
{  "object": "audience",  "id": "aud_4c1b8e2a7d9f05c36b4e8a71",  "deleted": true}

The built-in default audience cannot be deleted. That call is refused with 409 audience_immutable, because the default audience is what makes the book readable as a list.

There is no undo, and a new audience with the same name comes back empty.

To keep the audience and take everybody out of it, empty it instead with POST /audiences/{id}/empty.

An OAuth access token needs a verification code to delete an audience you created. Until the app has verified one in the last 60 minutes, the call answers 403 step_up_required and changes nothing. An API key is never asked. The Authentication page shows how to ask for a code and verify it.

Reference