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

Add suppressions in bulk

POST/suppressions/batch/add
授权
AuthorizationBearer 令牌 · header必填

A BillionSend API key (bs_…).

请求体
必填application/json
emailsstring<email>[]必填

Addresses to block, up to 1000; duplicates collapse

最少 1 项 · 最多 1000 项
originstring

Origin recorded on rows this request creates (default manual): bounce, complaint or manual; an address already suppressed keeps its origin

允许值:bouncecomplaintmanual
响应
200

One entry per distinct address (case-insensitive) in input order; addresses already suppressed return their existing id and keep their origin. New rows record the request's origin (bounce, complaint or manual; default manual). Accepts up to 1000 addresses.

dataSuppressionIdResponse[]必填
显示属性
SuppressionIdResponse 数组
objectstring必填
允许值:suppression
idstring<uuid>必填
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/suppressions/batch/add' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
  "emails": [
    "user@example.com"
  ],
  "origin": "bounce"
}'
响应
{
  "data": [
    {
      "object": "suppression",
      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08"
    }
  ]
}

这个页面有帮助吗?