Knowledge bases
Creates a knowledge base (KB) in your project. A KB is a named container of documents that an agent can retrieve from during a call. Provide a human-readable name, a stable machine key used to reference the KB from agents/tools, and a desc that tells the agent when to use this KB. The key must be unique within the project — a duplicate returns 409. Returns the created KB, including its id and document_count (0 to start). Next steps: upload documents with POST /api/ext/document/file, then link the KB to an agent so it becomes retrievable at call time.
curl --request POST \
--url 'https://api.nabrah.ai/api/ext/kb' \
--header 'X-API-Key: <your-api-key>' \
--header 'Content-Type: application/json' \
--data '{
"name": "Product FAQ",
"key": "product_faq",
"desc": "Answers about product features, pricing, plans, and returns. Use for general product questions."
}'{
"id": "00000000-0000-4000-8000-000000000000",
"project_id": "00000000-0000-4000-8000-000000000000",
"name": "string",
"key": "string",
"desc": "string",
"document_count": 0,
"created_at": "2026-01-15T12:00:00.000Z",
"updated_at": "2026-01-15T12:00:00.000Z"
}nameHuman-readable display name for the knowledge base. 1–255 characters.
namekeyStable machine identifier used to reference this KB from agents. Must match ^[A-Za-z_][A-Za-z0-9_]*$ (letters, digits, underscore; not starting with a digit), 1–100 chars, and be unique within the project.
keydescShort description of what the KB contains and when the agent should consult it. This guides retrieval, so be specific.
descDuplicate key in the same project returns 409.
X-API-KeystringheaderrequiredYour workspace API key. Create one in the dashboard under API keys.
A simple product knowledge base.
{
"name": "Product FAQ",
"key": "product_faq",
"desc": "Answers about product features, pricing, plans, and returns. Use for general product questions."
}Successful Response
application/json
Validation Error
application/json