---
title: "Merge a source entity into a target entity."
method: POST
path: "/v1/entities/merge"
tags: ["Entities"]
---

# Merge a source entity into a target entity.

`POST /v1/entities/merge`

Re-scopes all memories, attributes, cards, and graph edges from `source` to `target` in a single transaction, then deletes the source entity.

## Request body

- object
  - `source` object, required
    - `entity_id` string, required
    - `entity_type` 'user' | 'agent' | 'session', required
  - `target` object, required
    - `entity_id` string, required
    - `entity_type` 'user' | 'agent' | 'session', required

## Response `200`

Counts of records moved per table.

- object

## Other responses

- `400` — Input validation error
- `500` — Internal server error

## Changes

- **2026-07-17** `d501daa39bb2` — 1 info
  - endpoint added
- **2026-05-18** `457c8928e1ab` — 1 breaking
  - api path removed without deprecation

[Change history](https://skmtc.dev/atomicstrata/apis/atomicmemory-http-api/changes/v1/entities/merge/post.md)

---

[API](https://skmtc.dev/atomicstrata/apis/atomicmemory-http-api.md) · [All operations](https://skmtc.dev/atomicstrata/apis/atomicmemory-http-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/atomicstrata/atomicmemory-http-api/revisions/d501daa39bb2/schema)
