Delete Transcription
curl --request DELETE \
--url https://api.example.com/transcriptions/{appointmentId} \
--header 'Authorization: <authorization>'import requests
url = "https://api.example.com/transcriptions/{appointmentId}"
headers = {"Authorization": "<authorization>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {Authorization: '<authorization>'}};
fetch('https://api.example.com/transcriptions/{appointmentId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/transcriptions/{appointmentId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/transcriptions/{appointmentId}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("Authorization", "<authorization>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://api.example.com/transcriptions/{appointmentId}")
.header("Authorization", "<authorization>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/transcriptions/{appointmentId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Authorization"] = '<authorization>'
response = http.request(request)
puts response.read_body{
"success": true
}Transcriptions
Delete Transcription
Delete the transcription stored for a specific appointment.
DELETE
/
transcriptions
/
{appointmentId}
Delete Transcription
curl --request DELETE \
--url https://api.example.com/transcriptions/{appointmentId} \
--header 'Authorization: <authorization>'import requests
url = "https://api.example.com/transcriptions/{appointmentId}"
headers = {"Authorization": "<authorization>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {Authorization: '<authorization>'}};
fetch('https://api.example.com/transcriptions/{appointmentId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/transcriptions/{appointmentId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/transcriptions/{appointmentId}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("Authorization", "<authorization>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://api.example.com/transcriptions/{appointmentId}")
.header("Authorization", "<authorization>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/transcriptions/{appointmentId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Authorization"] = '<authorization>'
response = http.request(request)
puts response.read_body{
"success": true
}Overview
Deletes the transcription stored for a specific appointment, located byappointment_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.
Authorization: Bearer <JWT>
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.665f8a1b2c3d4e5f6789012f3
Response
boolean
required
Always
true on a successful deletion. No further payload is returned.Example Request
curl -X DELETE \
'https://app.medisync.me/api/transcriptions/665f8a1b2c3d4e5f6789012f3' \
-H 'Authorization: Bearer <JWT>'
const response = await fetch(
'https://app.medisync.me/api/transcriptions/665f8a1b2c3d4e5f6789012f3',
{
method: 'DELETE',
headers: {
'Authorization': 'Bearer <JWT>'
}
}
);
const result = await response.json();
import requests
headers = {'Authorization': 'Bearer <JWT>'}
response = requests.delete(
'https://app.medisync.me/api/transcriptions/665f8a1b2c3d4e5f6789012f3',
headers=headers
)
result = response.json()
Example Response
Success (200)
{
"success": true
}
Error Responses
401 Unauthorized
{
"success": false,
"message": "Unauthorized"
}
403 Forbidden (not the owning doctor)
{
"success": false,
"error": "Forbidden"
}
404 Transcription Not Found
{
"success": false,
"error": "Transcription not found"
}
404 Appointment Not Found
{
"success": false,
"error": "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 foundis returned when no transcription exists for the appointment;Appointment not foundis returned when the transcription exists but its appointment does not. - Success shape: A successful deletion returns
{ "success": true }only.