Delete document
DELETE/documents/:documentId
Select the deletion behavior using deleteType (case-insensitive; surrounding whitespace is ignored):
- SOFT_DELETE temporarily hides the document's metadata, attributes, and associated records from normal API requests. Restore the document using PUT /documents/{documentId}/restore, or list soft-deleted documents using GET /documents?softDeleted=true.
- HARD_DELETE deletes the document's metadata and current contents.
- CONTENT_ONLY removes the current S3 object while retaining document metadata, attributes, tags, processing results, and workflow history. Existing S3 versions are retained. Returns 404 when the current content does not exist, including repeated content deletion.
When no deletion option is supplied, the document's metadata and current contents are deleted.
The deprecated softDelete parameter remains supported for backward compatibility. Without deleteType, softDelete=true selects SOFT_DELETE. If softDelete is false or omitted, HARD_DELETE is used.
When deleteType is supplied, it takes precedence and softDelete is ignored.
Request
Responses
- 200
- 400
- 404
200 OK
Response Headers
Access-Control-Allow-Origin
Access-Control-Allow-Methods
Access-Control-Allow-Headers
Invalid deletion mode.
Document or content not found. Content-only deletion returns this status when the current S3 object is absent, including repeated deletion, with the message "Document content for {documentId} not found."