Documents
Delete Medical Document
Delete a document by its document ID
DELETE
Overview
Permanently deletes a document. Theid in the path is the document ID (Document._id), not an appointment ID. The document must be owned by the authenticated doctor; a document that does not exist or is owned by someone else returns 404.
This endpoint is plan-gated by the
documents.attach_additional feature. Accounts whose plan does not include it receive 403 FEATURE_NOT_AVAILABLE.Authentication
Bearer token for authenticated access. The doctor’s ID is extracted from the JWT token and used to scope ownership.
Path Parameters
The document ID (
Document._id, ObjectId) to delete. Must be owned by the authenticated doctor, otherwise a 404 is returned.Response
Whether the deletion was successful
Empty object (
{}) on successful deletionError message (only present when
success is false)Example Request
Example Response
Error Responses
Behavior
- Two-phase deletion: the file is deleted from storage first, then the database record. If storage deletion fails, the database record is not removed and a
400is returned.