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.
| Parameter | Type | Required | Description |
|---|---|---|---|
emails | string[] | no | Addresses never to write to, such as lee.park@coastal-office.example. |
domains | string[] | no | Company 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_id | string | no | Hold them back from this tenant's campaigns only, such as cus_4821. Without it, from all of yours. |
Response
Errors are described in Errors.
| Field | Type | Description |
|---|---|---|
data | object | What became of the entries. |
data.added | integer | Entries that are new on the list. |
data.already_listed | integer | Entries that were on the list already. |
data.rejected | object[] | Entries that were not added, each with the reason. |
data.rejected[].value | string | |
data.rejected[].message | string | |
notice | string | null | A plain sentence when there is something to know about this answer. Null otherwise. |
usage | object | Nothing is charged here. The balance, for reference. |
usage.cost | number | What this call cost, in US dollars. |
usage.balance | number | The balance left after this call, in US dollars. |
usage.replayed | boolean | True 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.