Delete or expire a document by ID
DELETE/documents/:document_id
Deletes or expires a document found by the document identifier alone, without the pipeline identifier. Without expire, the operation permanently removes every version and every fragment of the document and returns status 204. With expire=true, the operation marks every current version as expired and returns status 200, and the version history remains readable.
Permissions. To delete: read, write and execute on the pipeline, and the document's classification in the allow-list. To expire: write and execute on the pipeline, and the document's classification in the allow-list.
Documents, versions and fragments compares expiry and deletion.
Request
Responses
- 200
- 204
- 400
- 401
- 403
- 404
The document was expired (expire=true). The body is empty.
The document was deleted. The body is empty.
The as_of value lies outside the range of valid timestamps (Invalid version).
The authentication headers are missing or invalid, or the API key is inactive or expired. Errors lists the messages.
The key lacks write or execute permission on the pipeline, or the key's classification allow-list for the pipeline does not include the document's classification (Unauthorized: access level ... required for Pipeline with id ...). An expiry also returns 403 when the license does not permit the operation (Invalid license: ...).
No document with this identifier exists, or no version of the document was created at or before as_of (Document with id <id> not found). A deletion also returns 404 when the key lacks read permission on the pipeline (Pipeline with id <id> not found).