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

Parameters: merge_contacts
NameTypeDescription
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
curl -X POST https://cotlet.dev/api/v1/mautic/duplicates/2217/contacts/1042/merge \
  -H "Authorization: Bearer $COTLET_API_KEY"
Python
result = client.call("mautic", "merge_contacts", {"contact_id":1042,"duplicate_id":2217})
Node.js
const result = await cotlet.call('mautic', 'merge_contacts', {"contact_id":1042,"duplicate_id":2217});
CLI
cotlet call mautic merge_contacts --data '{"contact_id":1042,"duplicate_id":2217}'

Example response

JSON

{
  "merged": true,
  "contact_id": 1042,
  "removed_contact_id": 2217
}

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.