---
title: "Merge Contacts"
method: POST
path: "/v1/workspaces/{workspace_id}/actions/contact_merge"
tags: ["Contacts"]
---

# Merge Contacts

`POST /v1/workspaces/{workspace_id}/actions/contact_merge`

## Request

- Base URL: `https://api.oxvo.com`
- URL: `https://api.oxvo.com/v1/workspaces/{workspace_id}/actions/contact_merge`
- Auth: API key in header `api_access_token`

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.

## Request body

- object
  - `base_contact_id` integer, required: ID of the contact that will remain after the merge and receive all data
  - `mergee_contact_id` integer, required: ID of the contact that will be merged into the base contact and deleted

## Response `200`

Contacts merged successfully

- ContactBase
  - `id` number
  - `payload` object[]
    - `additional_attributes` object: The object containing additional attributes related to the contact
    - `availability_status` string: The availability status of the contact
    - `email` string: The email address of the contact
    - `id` integer: The ID of the contact
    - `name` string: The name of the contact
    - `phone_number` string: The phone number of the contact
    - `blocked` boolean: Whether the contact is blocked
    - `identifier` string: The identifier of the contact
    - `thumbnail` string: The thumbnail of the contact
    - `custom_attributes` object: The custom attributes of the contact
    - `last_activity_at` integer: The last activity at of the contact
    - `created_at` integer: The created at of the contact
    - `contact_inboxes` ContactInboxes[]
      - `source_id` string: Contact Inbox Source Id
      - `inbox` InboxContact
        - `id` number: ID of the inbox
        - `avatar_url` string: The avatar image of the inbox
        - `channel_id` number: The ID of the channel
        - `name` string: The name of the inbox
        - `channel_type` string: The type of the inbox
        - `provider` string: The provider of the inbox

## Other responses

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

---

[API](https://skmtc.dev/oxvo/apis/oxvo-apis.md) · [All operations](https://skmtc.dev/oxvo/apis/oxvo-apis/llms.txt) · [OpenAPI document](https://skmtc.dev/oxvo/apis/oxvo-apis/revisions/9a8448cbd1fe?raw)
