Merge contacts
Merges a duplicate into a contact, like the Merge item on the contact page.
POST https://cotlet.dev/api/v1/mautic/duplicates/{duplicate_id}/contacts/{contact_id}/merge
write Confirm
Runs the Merge action from contact_id: the contact you open, then the duplicate you search for. A merge cannot be undone through Cotlet, and an ID that does not exist fails before anything changes. By default you confirm each call; you can switch that off for this tool.
Parameters
| Name | Type | Description |
|---|---|---|
| contact_id integer required | integer | The contact you open and keep, from list_contacts. |
| duplicate_id integer required | integer | The duplicate to merge into it, from list_contacts. |
Request
curl -X POST https://cotlet.dev/api/v1/mautic/duplicates/2217/contacts/1042/merge \
-H "Authorization: Bearer $COTLET_API_KEY" result = client.call("mautic", "merge_contacts", {"contact_id":1042,"duplicate_id":2217}) const result = await cotlet.call('mautic', 'merge_contacts', {"contact_id":1042,"duplicate_id":2217}); cotlet call mautic merge_contacts --data '{"contact_id":1042,"duplicate_id":2217}' Example response
{
"merged": true,
"contact_id": 1042,
"removed_contact_id": 2217
}