---
title: "entities.merge"
method: POST
path: "/capabilities/entities.merge"
tags: ["Capabilities"]
---

# entities.merge

`POST /capabilities/entities.merge`

Merge multiple legal entities into one. Reassigns all linked documents to the kept entity, adds merged entity names as aliases, and deletes the duplicates.

## Request body

- object
  - `keepEntityId` string, required — ID of the legal entity to keep as the canonical record
  - `mergeEntityIds` KeepEntityId[], required — IDs of legal entities to merge into the kept entity. Their names become aliases and linked documents are reassigned. — unresolved $ref

## Response `200`

Successful response

- object
  - `success` boolean
  - `code` integer
  - `data` object
    - `result` object — Capability-specific result

## Other responses

- `400` — Invalid input
- `401` — Authentication required
- `404` — Resource not found

## Changes

- **2026-07-31** `da17f0eb65a2` — 1 breaking
  - the `mergeEntityIds/items/` request property type changed from `string` to no type

[Change history](https://skmtc.dev/receiptor/apis/receiptor-ai-api/changes/capabilities/entities.merge/post.md)

---

[API](https://skmtc.dev/receiptor/apis/receiptor-ai-api.md) · [All operations](https://skmtc.dev/receiptor/apis/receiptor-ai-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/receiptor/receiptor-ai-api/revisions/6687ff8993a0/schema)
