Delete multiple contacts

Deletes several contacts in one call. This is the v3 equivalent of the v1 contact_delete_list action.

The body selects what to delete, in one of two shapes:

  • {"ids": [1, 2]} deletes the given contacts.
  • {"deleteAll": true} deletes every contact that is actively subscribed to a list the caller can access.

ids and deleteAll are mutually exclusive. Either shape may add listids to limit the delete to those lists. The accessible lists are the lists the API user's group may manage; listids is narrowed to them.

A contact is removed from each affected list. A contact removed from its last list is deleted from the account and moved to the contact archive, where it is kept for 360 days and may be restored (see GET /contactArchives). A contact on no list is deleted from the account directly, and archived the same way. Removing a contact from a list it stays on is not archived. A contact on only one list is deleted from the account even when that list is not in listids.

There is no cap on the number of ids per request, but deletion runs synchronously one contact at a time, so very large requests may time out. The account also has a delete allowance per billing period, set by its plan; when it is used up the run stops.

Deletion is not transactional: contacts are removed one at a time, so a call can partially succeed. deleted and failed report the outcome per contact id. With deleteAll, a contact gone since the ids were collected is skipped silently.

Requires permission to delete contacts. Any method other than DELETE answers 405.

Body Params

Which contacts to delete: an explicit ids list or deleteAll, optionally narrowed by listids.

Delete the listed contacts.

ids
array
required
length ≥ 1

Ids of the contacts to delete. Positive integers; numeric strings are accepted and duplicates are ignored. "_all" is not accepted here; use deleteAll instead.

ids*
listids
array
length ≥ 1

Only remove the contacts from these lists. Positive integers; numeric strings are accepted. Omit to remove them from every accessible list.

listids
boolean
enum

Not allowed together with ids; a body with both keys is rejected with 400. It is listed here so that such a body matches both shapes and fails the oneOf check.

Allowed:
Responses

Language
Credentials
Header
URL
LoadingLoading…
Response
Choose an example:
application/json