- Preview a contact merge
Preview the result of merging one contact into another without applying the merge. This is a read-only dry run: it reports whether the merge is allowed and, if so, exactly what would change, without modifying any data.
Send the same from (a lead) and into (a user) contact IDs you would pass to Merge a lead and a user.
- When
allowedistrue, the response contains asummary: every attribute change (with the resulting value on the surviving contact) and, for each object type, two counts —from, how many are on the lead and would move to the user, andinto, how many the user already has. Counts are reported for conversations, tickets, phone calls, notes, and tags.conversationscounts non-ticket conversations only; tickets are reported separately undertickets, andphone_callsis present only for phone-lead merges. - When
allowedisfalse, the response containsreasons. Each reason has a stablecodeyou can branch on and a human-readablemessageyou can display.
By default a merge requires the two contacts to share an identifier (email, phone, or external ID). Set skip_duplicate_validation to true to preview a merge of contacts that don't — the same rule the merge endpoint enforces.
When allowed is false, reasons[].code is one of:
| code | meaning |
|---|---|
invalid_merge_role_pair | The from/into roles aren't mergeable. from must be a lead and into a user. |
no_shared_identifier | The contacts share no email, phone, or external ID. Set skip_duplicate_validation to preview anyway. |
facebook_user | Facebook contacts can't be merged. |
external_lead_channel_not_allowed | The source is an external-channel lead that isn't eligible for merging. |
mailing_list | Contacts created from a mailing list can't be merged. |
Intercom API version.
By default, it's equal to the version set in the app package.
The unique identifier for the contact to merge away from. Must be a lead.
The unique identifier for the contact to merge into. Must be a user.
- The production API serverhttps://api.intercom.io/contacts/merge/preview
- The european API serverhttps://api.eu.intercom.io/contacts/merge/preview
- The australian API serverhttps://api.au.intercom.io/contacts/merge/preview
curl -i -X POST \
https://api.intercom.io/contacts/merge/preview \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
-H 'Content-Type: application/json' \
-H 'Intercom-Version: Preview' \
-d '{
"from": "6762f0d51bb69f9f2193bb7f",
"into": "6762f0d51bb69f9f2193bb80"
}'successful
Returned when the merge is allowed.
A summary of the changes the merge would make to the surviving contact.
- Merge preview allowed
- Merge preview not allowed
- Merge allowed
- Merge not allowed
{ "allowed": true, "summary": { "attribute_changes": { … }, "reassignments": { … } } }