Skip to main content
DELETE
https://app.medisync.me
/
api
/
transcriptions
/
{appointmentId}
Delete Transcription
curl --request DELETE \
  --url https://app.medisync.me/api/transcriptions/{appointmentId} \
  --header 'Authorization: <authorization>'
{
  "success": true,
  "error": "<string>"
}

Overview

Deletes a transcription associated with a specific appointment ID. This operation removes the transcription record from the database permanently.
Permanent Deletion: This operation permanently deletes the transcription and cannot be undone. The transcription will be removed from the database.

Authentication

Authorization
string
required
Bearer JWT token for authentication
Authorization: Bearer your_jwt_token_here

Path Parameters

appointmentId
string
required
The appointment ID whose transcription should be deleted (MongoDB ObjectId)
65f8a1b2c3d4e5f6789012f3

Response

success
boolean
required
Indicates if the transcription was deleted successfully (always true for successful deletion)
error
string
Error message if the deletion failed

Example Request

curl -X DELETE \
  'https://app.medisync.me/api/transcriptions/65f8a1b2c3d4e5f6789012f3' \
  -H 'Authorization: Bearer your_jwt_token_here'

Example Response

Success Response
{
  "success": true
}
Error Response - Missing Appointment ID
{
  "success": false,
  "error": "Missing or invalid appointment ID"
}
Error Response - Transcription Not Found
{
  "success": false,
  "error": "Transcription not found"
}
Error Response - Database Error
{
  "success": false,
  "error": "An error occurred while deleting the transcription"
}

Behavior Notes

  • Delete by Appointment: The endpoint finds and deletes transcriptions using the appointment ID
  • Permanent Operation: The deletion is permanent and cannot be reversed
  • Error Handling: Provides specific error messages for different failure scenarios
  • Authentication Required: Requires valid JWT token for authorization
  • Validation: Checks for valid appointment ID parameter before attempting deletion

HTTP Status Codes

  • 200 OK: Transcription successfully deleted
  • 400 Bad Request: Missing or invalid appointment ID
  • 404 Not Found: Transcription not found for the given appointment ID
  • 500 Internal Server Error: Database or server error during deletion

Use Cases

  1. Clean Up Old Transcriptions: Remove transcriptions that are no longer needed
  2. Privacy Compliance: Delete transcriptions upon patient request
  3. Data Management: Remove incorrect or duplicate transcriptions
  4. Workflow Reset: Delete transcriptions to restart the transcription process