Remove opted-out contacts
Remove everyone on the Opt-Out List from one contact list.
MCP tool clicksend_write → remove_opted_out_contacts
write Confirm
Runs Clean Up > Remove Opted-out on one list against the list that holds your opt-outs, by default the Opt-Out List. ClickSend cleans one list at a time, so call it once per list. removed is how many contacts the list lost. By default you confirm each call; you can switch that off for this tool.
Parameters
| Name | Type | Description |
|---|---|---|
| list_id integer required | integer | Contact list ID from list_contact_lists. |
| opt_out_list string | string | Name of the list that holds the opt-outs. Default: Opt-Out List. |
tools/call
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "clicksend_write",
"arguments": {
"operation": "remove_opted_out_contacts",
"arguments": {
"list_id": 128734,
"opt_out_list": "Opt-Out List"
}
}
}
} Example response
{
"content": [
{
"type": "text",
"text": "{ ... same JSON as structuredContent ... }"
}
],
"structuredContent": {
"list_id": 128734,
"list": "Newsletter subscribers",
"opt_out_list": "Opt-Out List",
"removed": 37
},
"isError": false
}