Skip to main content

Replace the document with a new file

PUT 

/v1/knowledge_bases/:kb_id/documents/:document_id/file

Creates a new version of the document. The current ready version stays searchable until the new one is ready, then the switch is atomic. The temporary second copy is not billed as storage; processing the new file is billed. Only one replacement at a time (409 version_conflict). Version history is not exposed.

Access: API key scope knowledge:write; portal users: organization admins and owners; the knowledge base in the path must be on the key's access list; refused with 503 maintenance_mode during maintenance; refused with 403 module_disabled while knowledge bases are switched off on the platform.

Request​

Responses​

Replacement accepted; see pending_version.