Skip to main content

Delete document permanently

DELETE 

/company/documents/:id

Description

Permanently deletes a document and all its associated files from S3.

Access Requirements

  • Authentication: Valid JWT token
  • Minimum Role: Administrator (isAdmin)

Deletion Policy

  • Approved documents: Cannot be deleted (change to rejected)
  • Versions: Deletes all related versions
  • Files: Physically deletes files from S3
  • For incorrect documents: Use rejected
  • For obsolete documents: Create a new version

Usage Example

curl -X DELETE \
-H Authorization: Bearer {token} \
https://api.example.com/v1/documents/5f8d3b7a9c2d1e0f4a6b5c4d

Security Considerations

  • Irreversible operation
  • Audit log generated
  • Email notification sent to the creator

Request

Responses

Document successfully deleted