Skip to Content
Won.dev

Add suppressions

Put addresses or company domains on your do-not-contact list. Free.

POST https://api.won.dev/v1/email/suppressions

Puts addresses or whole company domains on your do-not-contact list: existing customers, competitors, anyone who asked you elsewhere not to be written to. It holds from the next email on, in every campaign, including the ones already running; with tenant_id, in that tenant's campaigns only. Adding something twice changes nothing. Up to 1000 addresses and 100 domains in one call. A test key has a list of its own, which real campaigns do not obey. Free.

  • Billing: Free.

Parameters

Parameters go in the JSON body. POST requests also take an Idempotency-Key header, see Sending a request twice.

ParameterTypeRequiredDescription
emailsstring[]noAddresses never to write to, such as lee.park@coastal-office.example.
domainsstring[]noCompany domains never to write to, such as coastal-office.example: every address at them is left out. Mail services such as gmail.com cannot be suppressed as a whole.
tenant_idstringnoHold them back from this tenant's campaigns only, such as cus_4821. Without it, from all of yours.

Response

Errors are described in Errors.

FieldTypeDescription
dataobjectWhat became of the entries.
data.addedintegerEntries that are new on the list.
data.already_listedintegerEntries that were on the list already.
data.rejectedobject[]Entries that were not added, each with the reason.
data.rejected[].valuestring
data.rejected[].messagestring
noticestring | nullA plain sentence when there is something to know about this answer. Null otherwise.
usageobjectNothing is charged here. The balance, for reference.
usage.costnumberWhat this call cost, in US dollars.
usage.balancenumberThe balance left after this call, in US dollars.
usage.replayedbooleanTrue when this is a repeat of a request from the last 24 hours. Repeats are free.

Example

curl https://api.won.dev/v1/email/suppressions \
  -H "Authorization: Bearer $WON_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "emails": [
    "lee.park@coastal-office.example"
  ],
  "domains": [
    "brightdesk.example"
  ]
}'
{
  "data": {
    "added": 2,
    "already_listed": 0,
    "rejected": []
  },
  "notice": null,
  "usage": {
    "cost": 0,
    "balance": 48.08,
    "replayed": false
  }
}

A test key (won_test_...) runs this in the sandbox: nothing is sent and nothing is charged.

On this page