main
knowledge-base

Replace document content and re-index

Changed on

Replace the text of a .txt or .md document and re-process it.

The stored file is overwritten and the document is re-indexed in the background. Agents keep using the previous version until that succeeds.

Access Control:

  • Users can only edit documents from their organization.
put/api/v1/knowledge-base/documents/{document_uuid}/content

Request

  • Base URL
    https://app.dograh.com
  • URL
    https://app.dograh.com/api/v1/knowledge-base/documents/{document_uuid}/content
  • Auth
    none declared

Path parameters

document_uuidstring required

Headers

authorizationstring nullable
X-API-Keystring nullable

Request body

contentstring required

New full text of the document

expected_file_hashstring required

file_hash returned when the content was loaded. The save is rejected if the document has changed since.

Response

Successful Response

idinteger required
document_uuidstring required
filenamestring required
file_size_bytesinteger required
file_hashstring required
mime_typestring required
processing_statusstring required
processing_errorstring nullable
total_chunksinteger required
retrieval_modestring
custom_metadataobject required
docling_metadataobject required
source_urlstring nullable
created_atstring date-time required
updated_atstring date-time required
organization_idinteger required
created_byinteger required
is_activeboolean required
has_live_contentboolean

Whether agents can currently retrieve this document's content. Stays true while an edited document is re-indexed or after its re-index fails, because the previous version keeps serving until a new one succeeds.

Changes