Unsubscribe contacts
Unsubscribe contacts from a list or exclude them from all campaigns.
MCP tool mailjet_write → unsubscribe_contacts
Give a segment or a list of emails. scope "list" unsubscribes the contacts from the list in list_id and keeps them on it. scope "exclusion_list" adds them to the Campaign Exclusion List, so they get no campaign or automation email from any list, but still get transactional email. The tool never deletes a contact, because Mailjet deletes are permanent. By default you confirm each call; you can switch that off for this tool.
Parameters
| Name | Type | Description |
|---|---|---|
| scope enum required | enum | list or exclusion_list. |
| list_id integer | integer | Contact list ID. Required when scope is list. |
| segment string | string | Name of a segment from list_segments. |
| emails array | array | Email addresses to unsubscribe or exclude. Give emails or segment, not both. |
tools/call
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "mailjet_write",
"arguments": {
"operation": "unsubscribe_contacts",
"arguments": {
"segment": "No answer to reconfirmation",
"scope": "exclusion_list"
}
}
}
} Example response
{
"content": [
{
"type": "text",
"text": "{ ... same JSON as structuredContent ... }"
}
],
"structuredContent": {
"scope": "exclusion_list",
"segment": "No answer to reconfirmation",
"excluded": 197
},
"isError": false
}