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

ParameterTypeRequiredDescription
emailstringRequiredThe address to suppress. Stored lowercase, so matching is case-insensitive.
reasonstringOptionalFree-form note (max 500 chars) stored with the entry, shown in the Console.
sourcestringOptionalmanual (default) or import. Entries created automatically from bounces/complaints carry internal sources you can't set here.
override_unsubscribesbooleanOptionalAllowlist 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

StatusDescription
201Created. The new suppression entry.
200Already suppressed. The existing entry is returned unchanged — the call is idempotent.
400Validation error.
401Missing or invalid API key.
500The 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()