Set Do Not Contact

Marks contacts Do Not Contact for email, with a reason, like the Set Do Not Contact (DNC) batch action.

PUT https://cotlet.dev/api/v1/mautic/do-not-contact

write Confirm

Applies the Set Do Not Contact (DNC) batch action to the contacts you list, with the reason text you give. Mautic then stops emailing them. It reaches nobody, but it changes who receives your campaigns. The list_contacts and get_contact replies show do_not_contact. By default you confirm each call; you can switch that off for this tool.

Parameters

Parameters: set_do_not_contact
NameTypeDescription
contact_ids array required array Contact IDs from list_contacts.
reason string string Reason text stored with the Do Not Contact entry.

Request

cURL
curl -X PUT https://cotlet.dev/api/v1/mautic/do-not-contact \
  -H "Authorization: Bearer $COTLET_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"contact_ids":"contact ids"}'
Python
result = client.call("mautic", "set_do_not_contact", {"contact_ids":"contact ids"})
Node.js
const result = await cotlet.call('mautic', 'set_do_not_contact', {"contact_ids":"contact ids"});
CLI
cotlet call mautic set_do_not_contact --data '{"contact_ids":"contact ids"}'

Example response

JSON

{
  "updated": 2,
  "channel": "email",
  "reason": "Asked to unsubscribe by reply"
}

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.