# Merge Contacts

URL: https://www.inclamo.com/docs/api/application/contacts/contactMerge

> 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.


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

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.


Base URL: https://helpdesk.inclamo.com

### Parameters

- `account_id` (path, required, integer): The numeric ID of the account

### Request body

`application/json` (required)

```json

{
  "type": "object",
  "required": [
    "base_contact_id",
    "mergee_contact_id"
  ],
  "properties": {
    "base_contact_id": {
      "type": "integer",
      "description": "ID of the contact that will remain after the merge and receive all data",
      "example": 1
    },
    "mergee_contact_id": {
      "type": "integer",
      "description": "ID of the contact that will be merged into the base contact and deleted",
      "example": 2
    }
  }
}

```

### Responses

- 200: Contacts merged successfully
- 400: Bad request - invalid contact IDs or contacts cannot be merged
- 401: Unauthorized
- 404: One or both contacts not found

Schemas referenced with $ref are defined in the OpenAPI file: https://www.inclamo.com/docs/api/openapi.json
