Documents
Update Document by File
Changed onDeprecated. Use Update Document instead. Updates a document by uploading a new file, then re-indexes it.
post/datasets/{dataset_id}/documents/{document_id}/update-by-file
Request
- Base URLhttps://api.dify.ai/v1
- URLhttps://api.dify.ai/v1/datasets/{dataset_id}/documents/{document_id}/update-by-file
- AuthHTTP bearer
Path parameters
dataset_idstring uuid required
Knowledge base ID, from List Knowledge Bases. For a scoped key, copy the ID from the Dify URL.
document_idstring uuid required
Document ID. From List Documents.
Request body multipart/form-data
Example request
{
"data": "{\"doc_form\":\"text_model\",\"doc_language\":\"English\",\"process_rule\":{\"mode\":\"automatic\"}}"
}Response
Document updated successfully.
Changes
- info
added the non-success response with the status
- info