Merge two contacts into one

Merges a victim contact into a surviving contact. The victim's data (conversations, events,
attributes, tags, notes, segments, companies, and analytics) is re-parented to the survivor, and the
victim contact is then permanently deleted. The survivor keeps its own identifiers; any identifier the
survivor is missing (email, WhatsApp number, custom ID) is inherited from the victim when available.

⚠️ Warning: This action is irreversible. Once merged, the victim contact no longer exists.

Which contact survives?

  • The contact in the URL path (polymorphic_contact_id) is the survivor — it is the one that remains.
  • The contact referenced by victim_polymorphic_contact_id in the body is the victim — it is merged in and deleted.

How to Identify the Contacts

Both the survivor (path) and the victim (victim_polymorphic_contact_id) accept any of these identifier formats:

1. Customerly Contact ID (numeric): 29911301
2. Custom User ID (prefix cuid:): cuid:user_123
3. Custom Lead ID (prefix clid:): clid:lead_456
4. WhatsApp Number (prefix wa:): wa:+1234567890 (E.164 format)
5. Email Address (prefix uem: for users or lem: for leads): uem:[email protected]

Asynchronous Processing

Merges are processed asynchronously in the background. The endpoint validates the request, queues the
merge, and returns 202 Accepted with an empty body. Only one merge involving a given contact can run at
a time — requesting a merge while another one involving either contact is still in progress returns a
409 Conflict.

Example Requests

# Merge lead lead_456 into the user with Customerly ID 29911301
POST /contacts/29911301/merge
{ "victim_polymorphic_contact_id": "clid:lead_456" }

# Merge a contact identified by email into a contact identified by WhatsApp number
POST /contacts/wa:+1234567890/merge
{ "victim_polymorphic_contact_id": "uem:[email protected]" }
Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Path Params
string
required

Identifier of the surviving contact (the one that remains after the merge). Can be: numeric ID (e.g., '12345'), custom user ID with 'cuid:' prefix, custom lead ID with 'clid:' prefix, WhatsApp with 'wa:' prefix, or email with 'uem:'/'lem:' prefix.

Body Params
string
required

Identifier of the victim contact (the one merged into the survivor and then deleted). Accepts the same identifier formats as the path parameter. Must resolve to a different contact than the survivor.

Responses
202

The merge has been accepted and queued for asynchronous processing. No content is returned in the response body.

401

Authentication credentials are missing or invalid. Please check your API key.

403

You don't have permission to merge contacts. Check your account permissions.

404

Contact not found. Either the surviving or the victim identifier doesn't match any contact in your account.

409

One of the contacts is already involved in an ongoing merge, or has already been merged into another contact.

422

Validation error. Check that victim_polymorphic_contact_id is provided and resolves to a contact different from the survivor.

Language
Credentials
Bearer
LoadingLoading…
Response
Click Try It! to start a request and see the response here!