Skip to Content
inclamoDocs

Merge Contacts

POST
/api/v1/accounts/{account_id}/actions/contact_merge

Merge two contacts into a single contact. The base contact remains and receives all data from the mergee contact. After the merge, the mergee contact is permanently deleted.

This action is irreversible. All conversations, labels, and custom attributes from the mergee contact will be moved to the base contact.

Authorization

headerAuthorizationBearer <token>

Authenticate with Authorization: Bearer <token> using a user API token from Profile Settings. Available in Chatwoot v4.19.0 and later.

Path Parameters

account_id*integer

The numeric ID of the account

Request Body

application/json
  1. body
base_contact_id*integer

ID of the contact that will remain after the merge and receive all data

mergee_contact_id*integer

ID of the contact that will be merged into the base contact and deleted

Response Body

Contacts merged successfully

application/json
  1. response
id?number
payload?array<>
Example Request
curl -X POST 'https://helpdesk.inclamo.com/api/v1/accounts/0/actions/contact_merge' \  -H 'Content-Type: application/json' \  -d '{  "base_contact_id": 0,  "mergee_contact_id": 0}'
Example Response
{  "id": 0,  "payload": [    {      "additional_attributes": {},      "availability_status": "string",      "email": "string",      "id": 0,      "name": "string",      "phone_number": "string",      "blocked": true,      "identifier": "string",      "thumbnail": "string",      "custom_attributes": {},      "last_activity_at": 0,      "created_at": 0,      "contact_inboxes": [        {          "source_id": "string",          "inbox": {            "id": 0,            "avatar_url": "string",            "channel_id": 0,            "name": "string",            "channel_type": "string",            "provider": "string"          }        }      ]    }  ]}