---
title: "Start a pass merging the entities extraction wrote more than once"
method: POST
path: "/api/v0/knowledge-bases/{kb_id}/graph/deduplicate"
tags: ["Knowledge Base Graph"]
---

# Start a pass merging the entities extraction wrote more than once

`POST /api/v0/knowledge-bases/{kb_id}/graph/deduplicate`

## Request

- Base URL: `https://api.outerport.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.outerport.com/api/v0/knowledge-bases/{kb_id}/graph/deduplicate`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/outerport/apis/outerport-api/docs/api/v0/knowledge-bases/:kb_id/graph/deduplicate/post.ts> (a function with typed inputs; its response is checked against the schema)

Queues one deduplication pass over the entity types the collection's subscribed packages declare an identity for and the classes the collection defines itself. Extraction reads each document alone and cannot know what an earlier document already named, so any type standing for a thing that exists once arrives spelled several ways; this resolves them. Merges that would lose attributes or collapse a relation into a self-loop are refused and reported rather than forced. Returns immediately with a job status to poll. Each block's merges commit as they land, so a cancelled or failed pass keeps the merges it made and a second pass continues from there.

## Path parameters

- `kb_id` string, uuid, required

## Response `202`

Successful Response

- DeduplicationResponse: The accepted pass, not its result. Poll ``job_status_id``; the pass runs as a task because it makes one model call per candidate block.
  - `job_status_id` string, uuid, required

## Other responses

- `422`: Validation Error

## Changes

- **2026-10-13** `7f81908bcdfe`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/outerport/apis/outerport-api/changes/api/v0/knowledge-bases/:kb_id/graph/deduplicate/post.md)

---

[API](https://skmtc.dev/outerport/apis/outerport-api.md) - [All operations](https://skmtc.dev/outerport/apis/outerport-api/llms.txt) - [OpenAPI document](https://skmtc.dev/outerport/apis/outerport-api/revisions/08b5bf6f7f18?raw)
