API reference

Content

Create, read, update, and delete content items within a knowledge base. Creating a content item triggers automatic chunking and embedding in the background.

Base path

https://api.kognita.ai/api/v1/knowledge-bases/{id}/contents
GET
/v1/knowledge-bases/{id}/contents

List contents

POST
/v1/knowledge-bases/{id}/contents

Create content (text)

POST
/v1/knowledge-bases/{id}/contents/file

Upload content (file)

GET
/v1/knowledge-bases/{id}/contents/{contentId}

Get content

PUT
/v1/knowledge-bases/{id}/contents/{contentId}

Update content

DELETE
/v1/knowledge-bases/{id}/contents/{contentId}

Delete content


List contents

GET
/api/v1/knowledge-bases/{id}/contents

Path parameters

ParameterTypeDescription
idrequired
string(path)Knowledge base ID.

Query parameters

ParameterTypeDescription
page
integer(query)Page number. Default: 1.
limit
integer(query)Items per page. Default: 20. Max: 100.

Responses

200OK
{
  "success": true,
  "data": [
    {
      "id": "cnt_xyz789",
      "contentChunk": "Kognita is a managed knowledge-base API...",
      "createdAt": "2026-05-08T10:00:05Z",
      "metadata": {}
    }
  ],
  "total": 42
}
404Knowledge base not found
500Internal Server Error

Create content (text)

POST
/api/v1/knowledge-bases/{id}/contents

Ingests a text string into the knowledge base. Kognita runs chunking and embedding asynchronously; the API returns as soon as the content record is persisted.

Path parameters

ParameterTypeDescription
idrequired
string(path)Knowledge base ID.

Request body

ParameterTypeDescription
textrequired
string(body)The text to ingest.
metadata
object(body)Optional arbitrary key/value metadata stored alongside the content and returned in search results.
Request example
{
  "text": "Kognita provides hybrid search over your data.",
  "metadata": { "source": "docs", "version": "2" }
}

Responses

201Created
{
  "success": true,
  "data": {
    "id": "cnt_xyz789"
  }
}
400Bad Request
404Knowledge base not found
500Internal Server Error

Upload content (file)

POST
/api/v1/knowledge-bases/{id}/contents/file

Uploads a file to be parsed and ingested into the knowledge base. Kognita extracts text from the file, then runs chunking and embedding asynchronously.

Path parameters

ParameterTypeDescription
idrequired
string(path)Knowledge base ID.

Request body

Send as multipart/form-data.

ParameterTypeDescription
filerequired
binary(body)The file to upload.

Responses

201Created
{
  "success": true,
  "data": {
    "id": "cnt_xyz789"
  }
}
400Bad Request
404Knowledge base not found
500Internal Server Error
502Bad Gateway

Get content

GET
/api/v1/knowledge-bases/{id}/contents/{contentId}

Path parameters

ParameterTypeDescription
idrequired
string(path)Knowledge base ID.
contentIdrequired
string(path)Content item ID.

Responses

200OK
{
  "success": true,
  "data": {
    "id": "cnt_xyz789",
    "contentChunk": "Kognita provides hybrid search over your data.",
    "createdAt": "2026-05-08T10:00:05Z",
    "metadata": {}
  }
}
404Not Found
500Internal Server Error

Update content

PUT
/api/v1/knowledge-bases/{id}/contents/{contentId}

Replaces the text of a content item and triggers re-embedding of all its chunks.

Path parameters

ParameterTypeDescription
idrequired
string(path)Knowledge base ID.
contentIdrequired
string(path)Content item ID.

Request body

ParameterTypeDescription
textrequired
string(body)Replacement text. All existing chunks will be deleted and regenerated.
metadata
object(body)Optional metadata to replace existing metadata.

Responses

200OK
{ "success": true }
400Bad Request
404Not Found
502Bad Gateway

Delete content

DELETE
/api/v1/knowledge-bases/{id}/contents/{contentId}

Permanently deletes a content item and all its chunks and embeddings.

Path parameters

ParameterTypeDescription
idrequired
string(path)Knowledge base ID.
contentIdrequired
string(path)Content item ID.

Responses

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