Add addresses to the do-not-email list
Stop emailing people who asked you to, or import a suppression list.
POST
/api/v1/do-not-emailScope
contacts:writePuts up to 1,000 addresses on the list. Contacts with those addresses are marked UNSUBSCRIBED, their sequences stop at once, and marketing automations they're in end. Addresses already on the list are counted in alreadyListed and left as they are.
Use it when someone asks not to be emailed through another channel, or to bring an existing suppression list over before your first campaign.
Body
Prop
Type
Example request
curl -X POST "https://api.pedibee.com/api/v1/do-not-email" \
-H "Authorization: Bearer $PEDIBEE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"emails": ["jane@northwind.io", "sam@globex.com", "not-an-email"],
"reason": "UNSUBSCRIBED",
"note": "Opted out in the CRM"
}'Response
Invalid addresses are reported, not added; the rest still go on the list.
{
"added": 2,
"alreadyListed": 0,
"invalid": [
"not-an-email"
]
}Errors
Every error is { "error": "…" } with a message you can show. See Errors and limits.
| Status | When |
|---|---|
400 | emails is missing or empty, has more than 1,000 items, or reason isn't UNSUBSCRIBED or MANUAL. |
403 | The key doesn't have contacts:write, or its creator's role no longer allows it. |
401 | The API key is missing, invalid, revoked or expired. |
429 | Too many requests. Wait for the seconds in Retry-After. |
