Skip to content
Esc
↑↓navigate↵open⌘Jpreview

Delete in bulk

Deletes up to 1000 contacts by id or by email address in one request and lists the rows actually deleted; unknown ids or addresses are skipped. Emails stay in the log; erase: true also scrubs each address from email history, event payloads and API logs, like DELETE /contacts/{id}?erase=true.

POST/contacts/batch/remove
Authorization
AuthorizationBearer token · headerrequired

A BillionSend API key (bs_…).

Request body
requiredapplication/json
idsstring<uuid>[]

Contact ids to delete, up to 1000

min items 1 · max items 1000
emailsstring<email>[]

Contact email addresses to delete, up to 1000; matched case-insensitively

min items 1 · max items 1000
eraseboolean

Also erase each address from email history, event payloads and API logs (GDPR/LGPD); by default the send log is kept

Responses
200

The contacts that were deleted

dataRemoveContactResponse[]required
Show properties
Array of RemoveContactResponse
objectstringrequired
Allowed:contact
contactstring<uuid>required
deletedbooleanrequired
Allowed:true
401

Missing, malformed, unknown or revoked API key

statusCodenumberrequired
namestringrequired
messagestringrequired
422

Validation error

statusCodenumberrequired
namestringrequired
messagestringrequired
429

Over the rate limit (rate_limit_exceeded, with Retry-After)

statusCodenumberrequired
namestringrequired
messagestringrequired
Try it
Server
Authorization
Bodyapplication/json
Request
curl -X POST 'https://api.billionsend.com/contacts/batch/remove' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
  "ids": [
    "497f6eca-6276-4993-bfeb-53cbbbba6f08"
  ],
  "emails": [
    "user@example.com"
  ],
  "erase": true
}'
Response
{
  "data": [
    {
      "object": "contact",
      "contact": "ad596931-5d7c-4d2b-907e-5b64c9432eb4",
      "deleted": true
    }
  ]
}

Was this page helpful?