Bulk add suppressions
Add up to 1,000 suppression entries in one call.
Migrating a list or syncing another system? Send up to 1,000 entries per call instead of one request per address. Bulk adds keep the idempotent semantics of the single endpoint — an entry that already exists counts as added, never as an error — and invalid rows are skipped and reported per-index while the rest of the batch proceeds.
POST /v3/suppressions/{type}/bulk
Body parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
entries | array | Required | 1–1,000 items of { email, reason?, override_unsubscribes? }. Addresses are lowercased; override_unsubscribes applies to allowlist entries only. |
Responses
| Status | Description |
|---|---|
200 | { added, skipped: [{ index, email, reason }] } — skip reasons are invalid_syntax and duplicate_in_batch, with 0-based indexes into your entries array. |
400 | Validation error (empty or >1,000 entries). |
429 | Rate limit exceeded (10 bulk calls/minute). |
Code examples
cURL
curl -X POST https://api.wemail.io/v3/suppressions/{type}/bulk \
-H "Authorization: Bearer afn_live_…" \
-H "Content-Type: application/json" \
-d '{ "entries": [ { "email": "bounce@example.com", "reason": "Hard bounce at previous ESP" }, { "email": "optout@example.com" } ] }'Node.js
const res = await fetch("https://api.wemail.io/v3/suppressions/{type}/bulk", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.WEMAIL_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({ "entries": [ { "email": "bounce@example.com", "reason": "Hard bounce at previous ESP" }, { "email": "optout@example.com" } ] }),
});
const data = await res.json();Python
import os, requests
r = requests.post(
"https://api.wemail.io/v3/suppressions/{type}/bulk",
headers={"Authorization": f"Bearer {os.environ['WEMAIL_API_KEY']}"},
json={ "entries": [ { "email": "bounce@example.com", "reason": "Hard bounce at previous ESP" }, { "email": "optout@example.com" } ] },
)
data = r.json()