Suppressionsrequires confirm HTTP API
POST/api/v1/projects/{project_id}/suppressions
add_suppression
Suppresses an address by hand (reason manual) for the project or one of its lists: it gets no mail of that scope; subscriber statuses are not changed.
- Call it
- when an address must not be mailed whatever list it is on.
- Needs
- an admin key with
project_id, or a project key with scopewrite(its own project; the argument is ignored), andconfirm: true; without it the call changes nothing and tells what it would do. - Returns
outcome(would_add,added,already_suppressed),effectin words and the suppression asPOST /api/v1/projects/{project_id}/suppressionsanswers it (null in a dry run of a new one).
Arguments
- object
-
emailstringrequiredThe address; any case and surrounding whitespace are normalized.
example
ann@example.com -
scopestringrequiredproject(every list) orlist:<list_id>(one list of the project).example
project -
confirmbooleantruesuppresses the address. Without it the call only tells what would happen and changes nothing.default
false -
project_idstring · uuid | nullThe project. An admin key must pass it; a project key’s own project is used and this is ignored.
-
reasonstringmanual, the only reason a caller gives (left out: the same).example
manual
No other arguments are accepted.
Result
The result comes back as structuredContent, with the same JSON as a text block.
- object · all fields required
-
effectstringThe outcome in words, for the agent and its user.
-
outcomeAdditionOutcomeWhat an addition did.
would_addA dry run: nothing changed; a call withconfirm: truesuppresses.addedSuppressed now.already_suppressedSuppressed for the scope before; nothing changed. -
suppressionSuppression | nullThe suppression as the API’s
POSTanswers it (201added,200already suppressed);nullin a dry run of a new one.6 fields
- Suppression object · all fields required
-
created_atstring · date-time -
emailstring · email -
project_idstring · uuidThe suppression’s project.
-
reasonstringunsubscribed_all,unsubscribed_list,hard_bounce,soft_bounce_limit,complaintormanual. -
scopestringproject(every list) orlist:<list_id>. -
sourcestringWhere it came from:
api(the API or MCP),web,deliveryorinbound.
Definitions
AdditionOutcome
What an addition did.
string · enum
would_add A dry run: nothing changed; a call with confirm: true suppresses.
added Suppressed now.
already_suppressed Suppressed for the scope before; nothing changed.
Suppression
An address on the project’s suppression list (GET /api/v1/projects/{project_id}/suppressions, an item).
- object · all fields required
-
created_atstring · date-time -
emailstring · email -
project_idstring · uuidThe suppression’s project.
-
reasonstringunsubscribed_all,unsubscribed_list,hard_bounce,soft_bounce_limit,complaintormanual. -
scopestringproject(every list) orlist:<list_id>. -
sourcestringWhere it came from:
api(the API or MCP),web,deliveryorinbound.
Errors
A failed call answers isError: true with a code from the same table as the HTTP API, and detail. How tools report errors
HTTP API
The same operation over HTTP: POST /api/v1/projects/{project_id}/suppressions