API reference
Knowledge bases
CRUD operations for knowledge base resources. All endpoints require the x-kognita-api-key and x-kognita-organization-id headers.
Base path
https://api.kognita.ai/api/v1/knowledge-basesGET
/v1/knowledge-basesList all knowledge bases
POST
/v1/knowledge-basesCreate a knowledge base
GET
/v1/knowledge-bases/{id}Get a knowledge base
PUT
/v1/knowledge-bases/{id}Update a knowledge base
DELETE
/v1/knowledge-bases/{id}Delete a knowledge base
List knowledge bases
GET
/api/v1/knowledge-basesReturns all knowledge bases belonging to the authenticated organization.
Headers
| Parameter | Type | Description |
|---|---|---|
x-kognita-api-keyrequired | string(header) | Your secret API key. |
x-kognita-organization-idrequired | string(header) | Your organization ID. |
Responses
200OK
{
"success": true,
"data": [
{
"id": "kb_abc123",
"name": "Product docs",
"description": "...",
"activeKnowledgeBaseConfigurationId": "kbc_...",
"createdAt": "2026-05-08T10:00:00Z",
"updatedAt": "2026-05-08T10:00:00Z"
}
]
}400Bad Request
500Internal Server Error
Create a knowledge base
POST
/api/v1/knowledge-basesCreates a new knowledge base and initializes its vector embedding configuration.
Request body
| Parameter | Type | Description |
|---|---|---|
namerequired | string(body) | Human-readable name for the knowledge base. |
description | string(body) | Optional description. |
typerequired | enum(body) | Knowledge base type. Controls embedding model quality and supported content modalities. One of: TEXT_COST_EFFECTIVE, TEXT_HIGH_QUALITY, TEXT_AND_MEDIA_HIGH_QUALITY. |
Request body example
{
"name": "Support articles",
"description": "Customer support knowledge base",
"type": "TEXT_HIGH_QUALITY"
}Responses
201Created
{
"success": true,
"data": {
"id": "kb_abc123"
}
}400Bad Request
500Internal Server Error
Get a knowledge base
GET
/api/v1/knowledge-bases/{id}Retrieves a single knowledge base by ID.
Path parameters
| Parameter | Type | Description |
|---|---|---|
idrequired | string(path) | The knowledge base ID. |
Responses
200OK
{
"success": true,
"data": {
"id": "kb_abc123",
"name": "Product docs",
"description": "...",
"activeKnowledgeBaseConfigurationId": "kbc_...",
"createdAt": "2026-05-08T10:00:00Z",
"updatedAt": "2026-05-08T10:00:00Z"
}
}404Not Found
500Internal Server Error
Update a knowledge base
PUT
/api/v1/knowledge-bases/{id}Updates the name of a knowledge base. The embedding configuration cannot be changed after creation.
Path parameters
| Parameter | Type | Description |
|---|---|---|
idrequired | string(path) | The knowledge base ID. |
Request body
| Parameter | Type | Description |
|---|---|---|
namerequired | string(body) | New name for the knowledge base. |
typerequired | enum(body) | Must match the original KB type (TEXT_COST_EFFECTIVE, TEXT_HIGH_QUALITY, or TEXT_AND_MEDIA_HIGH_QUALITY). The value is accepted but not changed. |
Responses
200OK
{ "success": true }404Not Found
500Internal Server Error
Delete a knowledge base
DELETE
/api/v1/knowledge-bases/{id}Irreversible. Deleting a knowledge base permanently removes all its content items, chunks, and embeddings.
Path parameters
| Parameter | Type | Description |
|---|---|---|
idrequired | string(path) | The knowledge base ID to delete. |
Responses
200Deleted
{ "success": true }404Not Found
500Internal Server Error