---
title: "Manage Kb"
method: POST
path: "/api/facade/manage_kb"
tags: ["facade"]
---

# Manage Kb

`POST /api/facade/manage_kb`

## Request

- Base URL: `https://api.vruum.ai`
- URL: `https://api.vruum.ai/api/facade/manage_kb`
- Auth: `HTTPBearer` (a scheme the document does not define)

Maintain the knowledge base — the consolidated KB writer.

Actions (id = document UUID):
- upsert: create or update a document (no id — the payload's `name` is
  the upsert key; `payload` = {name, content, doc_type?, summary?,
  metadata?}); bulk via `items`.
- delete: permanently delete a document. DESTRUCTIVE.
- reindex: rebuild a document's search index (no payload).

Bulk: delete/reindex take id arrays (server-side loop, per-item status —
partial failure reported per item, never silent; max 100). Payloads are
validated by the underlying route's schema.

## Request body

- WriterRequest: Uniform request body for every facade writer.
  - `action` string, required: The operation to perform — see the tool description for the action vocabulary and each action's id/payload semantics.
  - `id` union: Target entity id, or an ARRAY of ids to apply the same action+payload to each (max 100; see the tool description for which entity the id names per action).
    - string
    - string[]
  - `payload` object, nullable: Action-specific fields, validated by the underlying route's own schema (a bad field 422s with that route's precise errors). See the tool description per action.
  - `items` object[], nullable: For create-like actions only: an array of per-item payloads processed in order with per-item results (max 100). Mutually exclusive with `id` and `payload`.

## Response `200`

Successful Response

- unknown

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/vruum/apis/vruum-public-api.md) · [All operations](https://skmtc.dev/vruum/apis/vruum-public-api/llms.txt) · [OpenAPI document](https://skmtc.dev/vruum/apis/vruum-public-api/revisions/b8ada111c30a?raw)
