Skip to main content
DELETE
Delete Transcription

Overview

Deletes the transcription stored for a specific appointment, located by appointment_id. The caller must be the appointment’s owning doctor. On success the endpoint returns { "success": true } with no body payload.
Permanent deletion. This operation permanently removes the transcription record and cannot be undone.

Authentication

string
required
Bearer JWT token. The calling user is derived from the token.

Path Parameters

string
required
The appointment ObjectId whose transcription is deleted (looked up by appointment_id). The caller must be the appointment’s owning doctor.

Response

boolean
required
Always true on a successful deletion. No further payload is returned.

Example Request

Example Response

Success (200)

Error Responses

401 Unauthorized
403 Forbidden (not the owning doctor)
404 Transcription Not Found
404 Appointment Not Found
The Unauthorized response uses the message field; handler-level errors use the error field. Unexpected server errors return 500 { "success": false, "error": "<message>" }.

Behavior Notes

  • Lookup by appointment: The transcription is located by appointment_id.
  • Ownership: Only the appointment’s owning doctor may delete its transcription; otherwise the request returns 403 Forbidden.
  • Distinct 404s: Transcription not found is returned when no transcription exists for the appointment; Appointment not found is returned when the transcription exists but its appointment does not.
  • Success shape: A successful deletion returns { "success": true } only.