Skip to main content
patch/datasets/{dataset_id}/documents/status/{action}
Request example
Response
patch/datasets/{dataset_id}/documents/status/{action}

Authorization

Authorizationstringheaderrequired#

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_idstringrequired#
Knowledge base ID, from List Knowledge Bases. For a scoped key, copy the ID from the Dify URL.
actionenum<string>required#
enable activates documents for retrieval, disable deactivates them, archive moves them to the archive, un_archive restores them from the archive.
Options:enabledisablearchiveun_archive

Body

application/json
document_idsstring[]required#
Document IDs to update. Get them from List Documents.

Responses

application/json
Documents updated successfully.
resultstring#
Operation result.