Remove contacts from an audience in bulk
Takes up to 200 contacts out of one audience in one call, by address. Every one of them stays in the address book, in the default audience and in every other audience it was in.
Runs the real call against your workspace, with your own key.
POST /audiences/{id}/contacts/batch-remove
Takes up to 200 contacts out of one audience in one call, by address. Every one of them stays in the address book, in the default audience and in every other audience it was in.
Example
Needs audiences:write. The body has the same shape as the bulk add: emails with 1 to 200 addresses.
curl -X POST "$OE/audiences/aud_4c1b8e2a7d9f05c36b4e8a71/contacts/batch-remove" -H "$AUTH" -H 'content-type: application/json' -d '{ "emails": ["[email protected]", "[email protected]", "[email protected]"]}'{ "object": "audience_batch", "audienceId": "aud_4c1b8e2a7d9f05c36b4e8a71", "removed": 1, "notInAudience": ["[email protected]"], "missing": ["[email protected]"]}removed counts the memberships taken away, notInAudience lists the contacts that were not in this audience, and missing lists the addresses that are not contacts at all. Nothing happens to either list, so the call is safe to replay.
The built-in default audience cannot be thinned. The call is refused with 409 audience_immutable and nothing is removed. Delete a contact when you mean it to go.