Skip to navigation

Delete or archive a document

A document that is staged and has never been processed (a presign placeholder, or an upload with activate=false) is permanently deleted, then its S3 object is removed (best effort: an S3 failure is logged, not returned). Publishes document.deleted on the organization’s event stream.

A document that has been processed (active, superseded, or any lifecycle past uploaded) is referenced by its validation, extraction, coverage and call records, so it is archived instead: status becomes archived, the file is kept, and the response has deleted: false, archived: true. Publishes document.archived. The same file can be uploaded again afterwards.

Neither path supersedes or activates any other document or re-runs compliance. To replace a processed document, upload the new one — it supersedes the old.

Requires scope documents:write.

Authentication

AuthorizationBearer

Session JWT or API key (ak_...)

Path parameters

subcontractorIdstringRequiredformat: "uuid"
documentIdstringRequiredformat: "uuid"

Response

Document deleted, or archived if it had been processed
dataobjectOptional
messagestringOptional
Present only when archived.

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
404
Not Found Error
429
Too Many Requests Error
500
Internal Server Error