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-bases
GET
/v1/knowledge-bases

List all knowledge bases

POST
/v1/knowledge-bases

Create 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-bases

Returns all knowledge bases belonging to the authenticated organization.

Headers

ParameterTypeDescription
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-bases

Creates a new knowledge base and initializes its vector embedding configuration.

Request body

ParameterTypeDescription
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

ParameterTypeDescription
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

ParameterTypeDescription
idrequired
string(path)The knowledge base ID.

Request body

ParameterTypeDescription
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

ParameterTypeDescription
idrequired
string(path)The knowledge base ID to delete.

Responses

200Deleted
{ "success": true }
404Not Found
500Internal Server Error