> ## Documentation Index
> Fetch the complete documentation index at: https://docs.memloom.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Merge an entity into another

> Fold this entity into a surviving one: every mention and typed relationship is
repointed to the target (would-be duplicates and self-loops are dropped), then this
entity is deleted. The survivor keeps its own name and type. Use it for
near-duplicates that automatic resolution could not fold.




## OpenAPI

````yaml /openapi.yaml post /memory/entities/{id}/merge
openapi: 3.1.0
info:
  title: memloom local API
  version: 0.1.0
  description: >
    The HTTP API served by the `memloom serve` daemon on your machine. The CLI,
    the MCP server,

    and the viewer all route through this API. The daemon is the single owner of
    the store, so

    every client shares one consistent view of your memories.


    No authentication: the daemon binds to `127.0.0.1` only and is reachable
    solely from your

    own machine. Browser clients on other localhost ports are allowed via CORS.
servers:
  - url: http://127.0.0.1:4319
    description: Local memloom daemon
security: []
paths:
  /memory/entities/{id}/merge:
    post:
      summary: Merge an entity into another
      description: >
        Fold this entity into a surviving one: every mention and typed
        relationship is

        repointed to the target (would-be duplicates and self-loops are
        dropped), then this

        entity is deleted. The survivor keeps its own name and type. Use it for

        near-duplicates that automatic resolution could not fold.
      operationId: mergeEntity
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
          description: The entity that disappears.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - into
              properties:
                into:
                  type: string
                  format: uuid
                  description: The surviving entity.
      responses:
        '200':
          description: Merged.
          content:
            application/json:
              schema:
                type: object
                properties:
                  ok:
                    type: boolean
                    example: true
        '400':
          description: Self-merge, or validation failure.
        '404':
          description: Either entity id is unknown.

````