Skip to main content
POST

Authorizations

Authorization
string
header
default:<auth-token>
required

Your API token, sent raw (no Bearer prefix).

Body

name
string
required

A name for the knowledge base.

Required string length: 1 - 256
source
object
required
folderId
string

An existing folder to put it in. Send this or folderName, not both.

folderName
string

Creates a top-level folder with this name and puts it there. Send this or folderId, not both.

Maximum string length: 80

Response

Created, with status: "processing". Pages and text return the knowledge base. Files return { data: [ ... ] }, one per file. A file that couldn't be stored comes back with status: "failed", while the rest still go through.

Status and size fields describe the current version.

knowledgeId
string

5 characters

Example:

"k7x2m"

name
string
Example:

"pricing.pdf"

type
enum<string>
Available options:
pdf,
txt,
csv,
json,
docx,
md,
url
status
enum<string>
  • processing: being parsed and indexed. Not available to agents yet.
  • ready: indexed and available to agents.
  • failed: processing stopped. statusReason says why.
Available options:
processing,
ready,
failed
statusReason
string | null

Why processing failed.

failureCode
string | null

For example upload_failed or job_not_scheduled.

sizeInBytes
integer | null

0 for website knowledge bases.

pageCount
integer | null
sectionCount
integer | null
charCount
integer | null
folderId
string | null

null when it's at the top level.

currentVersion
integer

The version agents read from.

latestVersion
integer

The newest version. It may still be processing

createdAt
string<date-time>
updatedAt
string<date-time>