Merge Contacts
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
userApiKey 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.
In: header
Path Parameters
The numeric ID of the account
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/api/v1/accounts/0/actions/contact_merge" \ -H "Content-Type: application/json" \ -d '{ "base_contact_id": 1, "mergee_contact_id": 2 }'{
"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": {
"attribute_key": "attribute_value",
"signed_up_at": "dd/mm/yyyy"
},
"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"
}
}
]
}
]
}{
"description": "string",
"errors": [
{
"field": "string",
"message": "string",
"code": "string"
}
]
}{
"description": "string",
"errors": [
{
"field": "string",
"message": "string",
"code": "string"
}
]
}{
"description": "string",
"errors": [
{
"field": "string",
"message": "string",
"code": "string"
}
]
}