Skip to main content
POST
/
api
/
v1
/
accounts
/
{account_id}
/
actions
/
contact_merge
Merge Contacts
curl --request POST \
  --url https://app.chatwoot.com/api/v1/accounts/{account_id}/actions/contact_merge \
  --header 'Content-Type: application/json' \
  --header 'api_access_token: <api-key>' \
  --data '
{
  "base_contact_id": 1,
  "mergee_contact_id": 2
}
'
{
  "id": 123,
  "payload": [
    {
      "additional_attributes": {},
      "availability_status": "<string>",
      "email": "<string>",
      "id": 123,
      "name": "<string>",
      "phone_number": "<string>",
      "blocked": true,
      "identifier": "<string>",
      "thumbnail": "<string>",
      "custom_attributes": {
        "attribute_key": "attribute_value",
        "signed_up_at": "dd/mm/yyyy"
      },
      "last_activity_at": 123,
      "created_at": 123,
      "contact_inboxes": [
        {
          "source_id": "<string>",
          "inbox": {
            "id": 123,
            "avatar_url": "<string>",
            "channel_id": 123,
            "name": "<string>",
            "channel_type": "<string>",
            "provider": "<string>"
          }
        }
      ]
    }
  ]
}

Authorizations

api_access_token
string
header
required

This token can be obtained by visiting the profile page or via rails console. Provides access to endpoints based on the user permissions levels. This token can be saved by an external system when user is created via API, to perform activities on behalf of the user.

Path Parameters

account_id
integer
required

The numeric ID of the account

Body

application/json
base_contact_id
integer
required

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

Example:

1

mergee_contact_id
integer
required

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

Example:

2

Response

Contacts merged successfully

id
number
payload
object[]