Skip to content
VoxaDocs
Navigation
Open console →

Knowledge bases

Upload a file

POST/api/v1/knowledge-bases/{kb_id}/sources/file

A PDF, or a UTF-8 text or Markdown file (.txt, .md). It is processed in the background: poll the knowledge base until the source is ready.

Authorization

An API key (X-API-Key or Authorization: Bearer), or a signed-in member with the agents.edit permission.

X-API-KeyAuthorization: Beareragents.edit

Path parameters

kb_idstringrequired

Query parameters

timezonestringdefault: "Asia/Kolkata"

IANA time zone for every timestamp in the response (at, date, timestamp and *_at fields), as ISO 8601 with the offset. The X-Timezone header works too; the zone used comes back in the X-Timezone response header. An unknown zone is a 400.

Body multipart/form-data

filefilerequired

Response

201Success.
idstring
kb_idstring
kindenum<string>

One of:fileurltext

namestring
urlstring
content_typestring
sizeintegerdefault: 0
statusenum<string>

One of:processingreadyfailed

errorstring

Why processing failed, when status is failed.

chunk_countintegerdefault: 0
charactersintegerdefault: 0
created_atstring

date-time

processed_atstring | null

date-time

created_bystring
401No credentials, or they are invalid or revoked.
detailstring

What went wrong, in plain words.

403Your role (or an API key) lacks the permission.
detailstring

What went wrong, in plain words.

422Validation Error
detailobject[]
Show item attributes
locstring | integer[]
msgstring
typestring
429Over the per-key rate limit; wait for Retry-After.
detailstring

What went wrong, in plain words.

Esc