---
title: "Merge two identities (mergeIdentities)"
method: POST
path: "/mergeIdentities"
---

# Merge two identities (mergeIdentities)

`POST /mergeIdentities`

Merges a "toRetire" source identity into a "toSurvive" source identity. After a merge, the retired source is marked as merged and the surviving identity contains combined data. The response returns the surviving linkId. Note: only provider identities of the same type can be merged together (ie Practitioner to Practitioner, not Practitioner and Health Facility).

## Request body

- ServiceRequestMergeIdentities — Standard wrapper for all service requests.
  - `trackingId` string — Optional client-defined correlation ID.
  - `content` MergeIdentitiesWsRequest — Merge (retire) data from one source into another.
    - `toSurviveSource` Source, required — Tracks an identity back to its source system.
      - `date` string, date
      - `name` string — Unique source system name across Verato.
      - `id` string — Native ID of the identity within the source.
    - `toRetireSource` Source, required — Tracks an identity back to its source system.
      - `date` string, date
      - `name` string — Unique source system name across Verato.
      - `id` string — Native ID of the identity within the source.

## Response `200`

Merge identities response

- ServiceResponseMergeIdentities — Standard wrapper for all service responses.
  - `auditId` string — Unique audit identifier for correlating requests and responses.
  - `success` boolean — Indicates whether the business operation succeeded.
  - `warnings` string[] — Non-fatal warnings generated by the operation.
  - `retryableError` boolean — Indicates whether an error is transient and the request may be retried.
  - `message` string — Human-readable status message.
  - `errors` string[] — Error messages if success is false.
  - `trackingId` string — Echo of the request trackingId, if provided.
  - `content` MergeIdentitiesWsResponse — Merge identities response content.
    - `linkId` string
    - `toSurviveSource` Source — Tracks an identity back to its source system.
      - `date` string, date
      - `name` string — Unique source system name across Verato.
      - `id` string — Native ID of the identity within the source.

---

[API](https://skmtc.net/verato/apis/verato-provider-api.md) · [All operations](https://skmtc.net/verato/apis/verato-provider-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/verato/verato-provider-api/versions/adc923264a6f/schema)
