Skip to main content

Merge Contacts

POST 

/accounts/:account_id/actions/contact_merge

Merges the mergee contact into the base contact, then deletes the mergee.

The base contact takes over all conversations, messages, contact inboxes, list memberships, form submissions, notes, tickets, CSAT responses, files and labels. For attributes, the base contact's non-empty values win, and empty ones are filled from the mergee. An active block on the mergee is carried over if it is longer than the base contact's.

SettingValue
MethodPOST
Path/api/v1/accounts/{account_id}/actions/contact_merge
AuthorizationUser token. Requires delete permission on the mergee and update permission on the base contact (legacy: administrator; new rules: Contacts → delete and Contacts → update). Agent-bot tokens: not allowed.

Body parameters (JSON)

NameTypeRequiredDescription
base_contact_idintegerYesContact that is kept.
mergee_contact_idintegerYesContact that is merged and then deleted.

Example request

curl -X POST 'https://online.99digital.co.il/api/v1/accounts/12/actions/contact_merge' \
-H 'api_access_token: <YOUR_API_ACCESS_TOKEN>' \
-H 'Content-Type: application/json' \
-d '{ "base_contact_id": 801, "mergee_contact_id": 802 }'

Example response (200 OK): the base contact. It is not wrapped in payload, and has no contact_inboxes.

{
"additional_attributes": {
"company_name": "Example Ltd",
"city": "Tel Aviv"
},
"availability_status": "offline",
"email": "dana.cohen@example.com",
"id": 801,
"name": "Dana Cohen",
"phone_number": "+972501234567",
"identifier": "crm-801",
"thumbnail": "",
"custom_attributes": {
"customer_tier": "gold"
},
"blocked": false,
"is_whatsapp_contact": false,
"created_at": 1794470500
}

After the merge, GET /contacts/802 returns 404.

Request​

Responses​

The base contact after the merge.