跳到内容
Esc
↑↓导航↵打开⌘J预览

Delete contacts 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
授权
AuthorizationBearer 令牌 · header必填

A BillionSend API key (bs_…).

请求体
必填application/json
idsstring<uuid>[]

Contact ids to delete, up to 1000

最少 1 项 · 最多 1000 项
emailsstring<email>[]

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

最少 1 项 · 最多 1000 项
eraseboolean

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

响应
200

The contacts that were deleted

dataRemoveContactResponse[]必填
显示属性
RemoveContactResponse 数组
objectstring必填
允许值:contact
contactstring<uuid>必填
deletedboolean必填
允许值:true
401

Missing, malformed, unknown or revoked API key

statusCodenumber必填
namestring必填
messagestring必填
422

Validation error

statusCodenumber必填
namestring必填
messagestring必填
429

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

statusCodenumber必填
namestring必填
messagestring必填
试一试
服务器
授权
请求体application/json
请求
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
}'
响应
{
  "data": [
    {
      "object": "contact",
      "contact": "ad596931-5d7c-4d2b-907e-5b64c9432eb4",
      "deleted": true
    }
  ]
}

这个页面有帮助吗?