Skip to content

Merge Knowledge Base

POST /knowledge-bases/{kb_id}/merge

Fold source_kb_id into this one. The source row is deleted; its items are not.

The path names the survivor, deliberately. A route keyed on the base that disappears reads as “delete this into that”, and the merge’s preconditions — same ceiling, same embedding model — are properties of the survivor.

NameInTypeNotes
kb_idpathstring (uuid)required—
FieldTypeNotes
source_kb_idstring (uuid)required—
StatusDescriptionBody
200Successful ResponseMergeResult
422Validation ErrorHTTPValidationError

The body shows the fields the schema always carries. Which combination is legal is a service rule the schema cannot express, so read the description above before copying this.

Terminal window
curl -X POST https://your-deployment.example.com/knowledge-bases/{kb_id}/merge \
-H "Authorization: Bearer $COBRE_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"source_kb_id": "0190a2f4-0000-7000-8000-000000000000"
}'
FieldTypeNotes
target_kb_idstring (uuid)required—
source_kb_idstring (uuid)required—
items_reparentedintegeroptionalDefault 0.
items_deduplicatedintegeroptionalDefault 0.
edges_rewiredintegeroptionalDefault 0.
edges_droppedintegeroptionalDefault 0.
grants_reparentedintegeroptionalDefault 0.
grants_deduplicatedintegeroptionalDefault 0.
jobs_reparentedintegeroptionalDefault 0.
consolidation_runs_reparentedintegeroptionalDefault 0.
items_narrowedintegeroptionalDefault 0.