Skip to main content
Add Document
Send either a file or a source_url, not both. The response is 202 - ingestion runs in the background. Poll Get a knowledge base until the document’s status reads processed; a failed document carries an error_message.

Authorizations

Authorization
string
header
required

Your API key as a Bearer token, e.g. Authorization: Bearer vk_….

Path Parameters

kb_id
string
required

The knowledge base's id, from POST/GET /v1/knowledge-bases.

Body

multipart/form-data
source_url
string | null

Fetch the document from this URL instead of uploading bytes. Send this OR file, never both and never neither.

file
file | null

The document itself. Send this OR source_url. Read back as file_name — the response names what we stored, not the bytes.

Response

Accepted — the document is queued for processing. Poll the knowledge base until its status reads processed.

One piece of content in a knowledge base, as the public API promises it.

status is the ingestion state — adding a document returns 202 and processing happens in the background, so a client polls the KB until this reads processed.

id
string
required

The document's id.

file_name
string | null
required

The name we stored it under.

source_url
string | null
required

Where it was fetched from, for a URL-sourced document.

mime_type
string | null
required

What kind of file it is.

status
string
required

Where ingestion got to — pending, processing, processed, or failed. Ingestion is asynchronous: the upload returns 202 and the document is not searchable until this reads processed. On failed, error_message says why.

error_message
string | null
required

Why ingestion failed, if it did.

created_at
string<date-time>
required

When it was uploaded (UTC, ISO 8601).

updated_at
string<date-time>
required

When its status last changed (UTC, ISO 8601).