Skip to main content
POST
Update Document by File

Authorizations

Authorization
string
header
required

Every request authenticates with an API key: Authorization: Bearer {API_KEY}. App endpoints take an app API key; knowledge endpoints take a knowledge base API key (Get Started).

Keep keys server-side; never embed them in client code. Requests with a missing or invalid key fail with HTTP 401 (unauthorized).

Path Parameters

dataset_id
string<uuid>
required

Knowledge base ID. From List Knowledge Bases.

document_id
string<uuid>
required

Document ID. From List Documents.

Body

multipart/form-data
file
file

File to upload.

data
string

JSON string containing configuration. Accepts the same fields as Create Document by Text (doc_form, doc_language, process_rule, retrieval_model, embedding_model, embedding_model_provider) except name and text.

Example:

"{\"doc_form\":\"text_model\",\"doc_language\":\"English\",\"process_rule\":{\"mode\":\"automatic\"}}"

Response

Document updated successfully.

document
object
batch
string

Batch ID for tracking indexing progress.