Add a suppression
Add an address to a suppression list.
Manually suppress an address on one of your lists — useful when importing an existing opt-out list or honouring a deletion request.
POST /v3/suppressions/{type}
Body parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
email | string | Required | The address to suppress. Stored lowercase, so matching is case-insensitive. |
reason | string | Optional | Free-form note (max 500 chars) stored with the entry, shown in the Console. |
source | string | Optional | manual (default) or import. Entries created automatically from bounces/complaints carry internal sources you can't set here. |
override_unsubscribes | boolean | Optional | Allowlist entries only (ignored on other types): when true, the allowlist also delivers to an address that has unsubscribed. Default false — a recipient's opt-out normally wins over the allowlist. Only set this for inboxes you own; overriding a real recipient's opt-out is your compliance responsibility. |
Responses
| Status | Description |
|---|---|
201 | Created. The new suppression entry. |
200 | Already suppressed. The existing entry is returned unchanged — the call is idempotent. |
400 | Validation error. |
401 | Missing or invalid API key. |
500 | The entry could not be created — retry. |
Code examples
cURL
curl -X POST https://api.wemail.io/v3/suppressions/{type} \
-H "Authorization: Bearer afn_live_…" \
-H "Content-Type: application/json" \
-d '{ "email": "bounce@example.com", "reason": "Manual suppression" }'Node.js
const res = await fetch("https://api.wemail.io/v3/suppressions/{type}", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.WEMAIL_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({ "email": "bounce@example.com", "reason": "Manual suppression" }),
});
const data = await res.json();Python
import os, requests
r = requests.post(
"https://api.wemail.io/v3/suppressions/{type}",
headers={"Authorization": f"Bearer {os.environ['WEMAIL_API_KEY']}"},
json={ "email": "bounce@example.com", "reason": "Manual suppression" },
)
data = r.json()