> 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


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://developers.pipelinersales.com/api-docs/tutorials-and-articles/merging-accounts-contacts.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
