Unsubscribe contacts

Unsubscribe contacts from a list or exclude them from all campaigns.

MCP tool mailjet_write → unsubscribe_contacts

write Confirm

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

Parameters: unsubscribe_contacts
NameTypeDescription
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

JSON-RPC

{
  "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

JSON

{
  "content": [
    {
      "type": "text",
      "text": "{ ... same JSON as structuredContent ... }"
    }
  ],
  "structuredContent": {
    "scope": "exclusion_list",
    "segment": "No answer to reconfirmation",
    "excluded": 197
  },
  "isError": false
}

Sign in once. Your agent does the rest.

Sign up and add the apps you need. Free 7-day trial with 2,000 credits, no card needed.