**Source URL:** https://limited.veevavault.dev/safety/vault-api/api-reference/24.1/vault-objects/merge-object-records/initiate-record-merge.md

# Initiate Record Merge



Initiate a record merge operation in bulk. Starts a record merge job.
When merging two records together, you must select one record to be the `main_record_id` and one record to be the `duplicate_record_id`. The merging process updates all inbound references (including attachments) from other objects that point to the `duplicate` record and moves those over to the `main` record. Field values on the`main` record are not changed, and when the process is complete, the `duplicate` record is deleted. Record merges do not trigger [record triggers](/vault-sdk/entry-points/triggers/record-triggers/).

You can only merge two records together in a single operation, one `main` record and one `duplicate` record. This is called a merge set. If you have multiple `duplicate` records you wish to merge into the same`main` record, you need to create multiple merge sets and execute multiple record merges.

* The values in the input must be UTF-8 encoded.

* CSVs must follow the standard RFC 4180 format, with some [exceptions](/vault-api/references/csv-rfc-deviations).

* The maximum batch size is 10 merge sets.

The object must have **Enable Merges** configured, and the initiating user must have the correct permission such as the *Application: Object: Merge Records* permission. Learn more about the [configuration required for record merges in Vault Help](https://platform.veevavault.help/en/lr/659058).

<Endpoint path="/api/{version}/vobjects/{object_name}/actions/merge" method="POST"></Endpoint>

## Headers {#headers}

<FieldTable>
| Name | Description |
| --- | --- |
| `Content-Type` | `application/json` or `text/csv` |
| `Accept` | `application/json` (default) |
</FieldTable>

## URI Path Parameters {#uri-path-parameters}

<FieldTable>
| Name | Description |
| --- | --- |
| `{object_name}` | The object `name__v` field value. For example, `account__v`. This object must have **Enable Merges** configured. |
</FieldTable>

## Body Parameters {#body-parameters}

Upload parameters as a JSON or CSV file. You can merge up to 10 merge sets at once.

<FieldTable>
| Name | Description |
| --- | --- |
| `duplicate_record_id` | The ID of the `duplicate` record. Each `duplicate_record_id` can only be merged into one `main_record_id` record. When the merging process is complete, Vault deletes this record. |
| `main_record_id` | The ID of the `main` record. The merging process updates all inbound references (including attachments) from other objects that point to the `duplicate` record and moves those over to the `main` record. Vault does not change field values on the `main` record. |
</FieldTable>

## Request {#request}

<CodeExample title="">
```
curl -X POST -H "Authorization: {SESSION_ID}" \
--data-binary @"records-to-merge.json" \
https://myvault.veevavault.com/api/v24.1/vobjects/account__v/actions/merge

```
</CodeExample>

## Example JSON Request Body {#example-json-request-body}

<CodeExample title="">
```
[
   {
       "duplicate_record_id" : "0V0000000000003",
       "main_record_id" : "0V0000000000013"
   },
   {
       "duplicate_record_id" : "0V0000000000004",
       "main_record_id" : "0V0000000000013"
   },
   {
       "duplicate_record_id" : "0V0000000000005",
       "main_record_id" : "0V0000000000010"
   }
]

```
</CodeExample>

## Response {#response}

<CodeExample title="">
```
{
   "responseStatus": "SUCCESS",
   "data": {
       "job_id": 863204
   }
}


```
</CodeExample>

## Response Details {#response-details}

On `SUCCESS`, the job has successfully started and the response includes a `job_id`. On `FAILURE`, the job failed to start. There is no partial success.



---

**Previous:** [Merge Object Records](/safety/vault-api/api-reference/24.1/vault-objects/merge-object-records)  
**Next:** [Retrieve Record Merge Status](/safety/vault-api/api-reference/24.1/vault-objects/merge-object-records/retrieve-record-merge-status)