DELETE /api/documents/
Permanently deletes a document and its associated file from storage. This action cannot be undone.Authentication
This endpoint requires authentication using Laravel Sanctum. Include the bearer token in the Authorization header.Path parameters
The ID of the document to delete
Headers
Bearer token obtained from login endpoint
Set to
application/jsonAuthorization
Users can only delete their own documents. Attempting to delete another user’s document will return a 404 error.Response
Success message confirming the deletion
Example request
Example response
200 - Success
401 - Unauthorized
404 - Not found
A 404 error is returned both when the document doesn’t exist and when attempting to delete another user’s document. This prevents information disclosure about document existence.