Pular para o conteúdo
Esc
↑↓navegar↵abrir⌘Jpré-visualizar

Record an unsubscribe

POST/unsubscribes
Autorização
AuthorizationToken Bearer · headerobrigatório

A BillionSend API key (bs_…).

Corpo da requisição
obrigatórioapplication/json
emailstring<email>obrigatório

Bare email address that opted out; stored normalized (lowercase)

domain_idstring<uuid> | null

One of your domains: the address stops receiving marketing mail from it. Omitted or null: from every domain of the team

Respostas
200

The address now stops receiving marketing mail from the domain (domain_id) or from every domain of the team (domain_id omitted or null). Idempotent: an opt-out that already exists is returned as it is, with its original created_at.

idstring<uuid>obrigatório
emailstringobrigatório

The address; a tombstone for a recipient erased under GDPR/LGPD

domain_idstring<uuid> | nullobrigatório

The domain the opt-out is for; null for the whole team, or once that domain was deleted

domainstring | nullobrigatório

The domain's name; null for the whole team. A deleted domain's name stays, and its opt-outs apply again if the domain is added back

created_atstringobrigatório
objectstringobrigatório
Valores permitidos:unsubscribe
401

Missing, malformed, unknown or revoked API key

statusCodenumberobrigatório
namestringobrigatório
messagestringobrigatório
403

A key held to one domain recorded an opt-out for another domain or for the whole team

statusCodenumberobrigatório
namestringobrigatório
messagestringobrigatório
422

Validation error, or a domain_id that is not one of your domains

statusCodenumberobrigatório
namestringobrigatório
messagestringobrigatório
429

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

statusCodenumberobrigatório
namestringobrigatório
messagestringobrigatório
Experimentar
Servidor
Autorização
Corpoapplication/json
Requisição
curl -X POST 'https://api.billionsend.com/unsubscribes' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
  "email": "user@example.com",
  "domain_id": "b2f7354f-b74d-4332-ab10-1a5e3c56466c"
}'
Resposta
{
  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  "email": "string",
  "domain_id": "b2f7354f-b74d-4332-ab10-1a5e3c56466c",
  "domain": "string",
  "created_at": "string",
  "object": "unsubscribe"
}

Esta página foi útil?