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
| Name | Type | Description |
|---|---|---|
| contact_ids array required | array | Contact IDs from list_contacts. |
| reason string | string | Reason text stored with the Do Not Contact entry. |
Request
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"}' result = client.call("mautic", "set_do_not_contact", {"contact_ids":"contact ids"}) const result = await cotlet.call('mautic', 'set_do_not_contact', {"contact_ids":"contact ids"}); cotlet call mautic set_do_not_contact --data '{"contact_ids":"contact ids"}' Example response
{
"updated": 2,
"channel": "email",
"reason": "Asked to unsubscribe by reply"
}