Skip to main content
POST
upload knowledge group document

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

id
string
required

Unique identifier of the knowledge group

Body

multipart/form-data

Document file to upload into the knowledge group. Supported formats are PDF, TXT, MD, DOCX, CSV, and JSON, up to 50MB. Must be sent as multipart/form-data. Documents are processed asynchronously — the returned record starts in PROCESSING state and becomes searchable once it reaches READY.

file
file
required

Document file (PDF, TXT, MD, DOCX, CSV, or JSON, max 50MB).

chunkSize
integer

Maximum tokens per chunk for this document. Defaults to the group's chunkSize, or the default of 350 when the group has none. Setting chunkSize or chunkOverlap overrides the group's settings for this document. JSON files ignore chunk settings; they are kept whole up to 2000 tokens, and larger files are split at 1000 tokens with 50 overlap.

Required range: 100 <= x <= 2000
chunkOverlap
integer

Token overlap between chunks for this document. Must be at most half of chunkSize, or at most 175 when chunkSize is not set. Defaults to the group's chunkOverlap, or the default of 0 when the group has none. If you set only chunkSize, overlap is the default of 0 rather than the group's value.

Required range: 0 <= x <= 1000

Response

Successfully uploaded document

A single file uploaded into a knowledge group. Retrieved chunks reference it by ID.

id
string<uuid>

Unique identifier for the document.

knowledgeFolderId
string<uuid>

ID of the knowledge group this document belongs to.

filename
string

Original filename as uploaded.

fileType
string

MIME type or extension-derived file type.

fileSize
integer

Size of the file in bytes.

fileUrl
string<uri>

Internal URL at which the file is stored.

status
enum<string>

Current processing state. Only READY documents are searchable.

Available options:
UPLOADED,
PROCESSING,
READY,
FAILED
errorMessage
string | null

Failure reason when status is FAILED, otherwise null.

chunkSize
integer | null

Chunk size override set at upload, in tokens; null when not overridden. When both chunkSize and chunkOverlap are null, the document uses its group's settings. When only chunkOverlap is set, a null chunkSize means the default of 350.

chunkOverlap
integer | null

Chunk overlap override set at upload, in tokens; null when not overridden. When both chunkSize and chunkOverlap are null, the document uses its group's settings. When only chunkSize is set, a null chunkOverlap means the default of 0.

appliedChunking
object | null

Settings the last successful processing used. Null until the document has been processed.

createdAt
string<date-time>

Timestamp when the document was uploaded.

updatedAt
string<date-time> | null

Timestamp when the document record was last updated.