v6

latestOpenAPI 3.0.1raw.githubusercontent.com2026-08-0182128753.1 KB
Documents

Update Document by Text

Updates a document's text content, name, or processing configuration. Re-indexes the document when its text changes.

post/datasets/{dataset_id}/documents/{document_id}/update-by-text

Path parameters

dataset_idstring uuid required

Knowledge base ID. From List Knowledge Bases.

document_idstring uuid required

Document ID. From List Documents.

Request body

namestring

Document name. Required when text is provided.

textstring

Document text content.

doc_form'text_model' | 'hierarchical_model' | 'qa_model'

text_model for standard text chunking, hierarchical_model for parent-child chunk structure, qa_model for question-answer pair extraction.

doc_languagestring

Language of the document for processing optimization.

Response

Document updated successfully.

batchstring

Batch ID for tracking indexing progress.