Skip to main content
POST
confirm upload knowledge document

Authorizations

Authorization
string
header
required

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

Headers

X-Upload-Token
string

Lab's short-lived upload token, which Lab's own uploader sends instead of an API key. API clients authenticate with Authorization: Bearer <API key> and leave this out.

Path Parameters

id
string
required

The documentId from the presigned upload

Body

application/json

Not needed. A body is accepted for older clients and ignored, including any fileSize: the size is measured from storage.

The body is of type object.

Response

The upload was confirmed and the document is processing, or it was confirmed before and is returned as it is.

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. UPLOADED means a presigned upload is waiting for confirm-upload, and its file may not be stored yet. 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.