> For the complete documentation index, see [llms.txt](https://developers.pipelinersales.com/api-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developers.pipelinersales.com/api-docs/tutorials-and-articles/merging-accounts-contacts.md).

# Merging Accounts/Contacts

This tutorial should help you merge Accounts or Contact. Before moving forward, make sure your [**Authentication** ](/api-docs/overview/authentication.md)works and you understand the [**Key Concepts**](/api-docs/core-api-concepts/understanding-the-crm-concept.md) of the Coevera API, and make sure you know how to use [**API parameters**](/api-docs/core-api-concepts/api-parameters.md)

When you have two similar Accounts or Contacts you can use merge functionality to move all data from a duplicate to the master record. The Duplicate will be deleted at the same time

#### Merging Accounts

{% openapi src="/files/483oBiKgEGR3bPMLT8VK" path="/entities/Accounts/merge" method="post" %}
[openapi (1).json](https://3470708952-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FFpjbhrh1xo0SPAbAc7Ny%2Fuploads%2FOlNVdYj1h5GSxQmLHAjz%2Fopenapi%20\(1\).json?alt=media\&token=4be07353-5170-4a95-9100-4f16545d47b0)
{% endopenapi %}

#### Merging Contacts

{% openapi src="/files/483oBiKgEGR3bPMLT8VK" path="/entities/Contacts/merge" method="post" %}
[openapi (1).json](https://3470708952-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FFpjbhrh1xo0SPAbAc7Ny%2Fuploads%2FOlNVdYj1h5GSxQmLHAjz%2Fopenapi%20\(1\).json?alt=media\&token=4be07353-5170-4a95-9100-4f16545d47b0)
{% endopenapi %}

**Example of Account Merging**

The merging functionality through API works in the same way as[ **in the Application.**](https://help.pipelinersales.com/en/articles/3834458-merging-accounts-and-contacts)

```
/POST /entities/Accounts/merge
{
    "master": {
        "id": "4590b5a8-134a-404e-96f5-b40256bebc39"
    },
    "secondary_ids": [
        "109e5d1c-6d10-449b-b244-28438a428926"
    ]
}
```

`master-` This record will inherit data from a duplicate defined in secondary\_ids

`secondary_ids -` An Array of Duplicates, use Account IDs to specify the Account&#x73;**.** All duplicates are automatically deleted
