Skip to main content
DELETE
/
recordings
/
{appointmentId}
Delete Recording
curl --request DELETE \
  --url https://api.example.com/recordings/{appointmentId} \
  --header 'Authorization: <authorization>'
import requests

url = "https://api.example.com/recordings/{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/recordings/{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/recordings/{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/recordings/{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/recordings/{appointmentId}")
.header("Authorization", "<authorization>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.example.com/recordings/{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,
  "data": {
    "_id": "<string>",
    "appointment_id": "<string>",
    "recording_url": "<string>",
    "recording_key": "<string>",
    "append_recordings": [
      {}
    ],
    "file_size_bytes": 123,
    "createdAt": "<string>",
    "updatedAt": "<string>"
  }
}

Overview

Deletes the recording stored for a specific appointment. The recording is located by appointment_id. The stored file is removed and the database record is deleted; the deleted record is returned in the response.
Permanent deletion. This operation removes both the stored file and the database record and cannot be undone.

Authentication

Authorization
string
required
Bearer JWT token. The calling user is derived from the token.
Authorization: Bearer <JWT>

Path Parameters

appointmentId
string
required
The appointment ObjectId whose recording should be deleted. The recording is located by appointment_id.
665f8a1b2c3d4e5f6789012f3

Response

success
boolean
required
Indicates whether the recording was deleted successfully.
data
object
The deleted recording record.
Additional fields (for example merged_recording, replaced_recording, duration_seconds, __v) may appear on the returned object. Treat any field not documented here as opaque.

Example Request

curl -X DELETE \
  'https://app.medisync.me/api/recordings/665f8a1b2c3d4e5f6789012f3' \
  -H 'Authorization: Bearer <JWT>'
const response = await fetch(
  'https://app.medisync.me/api/recordings/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/recordings/665f8a1b2c3d4e5f6789012f3',
    headers=headers
)

result = response.json()

Example Response

Success (200)
{
  "success": true,
  "data": {
    "_id": "665f8a1b2c3d4e5f6789012f4",
    "appointment_id": "665f8a1b2c3d4e5f6789012f3",
    "recording_url": "https://storage.medisync.me/recordings/665f8a1b2c3d4e5f6789012f3_recording.wav",
    "recording_key": "665f8a1b2c3d4e5f6789012f3_recording.wav",
    "append_recordings": [],
    "file_size_bytes": 4831200,
    "createdAt": "2026-06-30T10:30:00.000Z",
    "updatedAt": "2026-06-30T10:30:00.000Z"
  }
}

Error Responses

401 Unauthorized
{
  "success": false,
  "message": "Unauthorized"
}
400 No Recording On File
{
  "success": false,
  "error": "Cannot read properties of null (reading 'recording_key')"
}
400 Storage Delete Failed
{
  "success": false,
  "error": "Access Denied"
}
The Unauthorized response uses the message field; handler-level errors use the error field. If there is no recording on file for the appointment, the request currently fails with a 400 error rather than a clean 404, so confirm a recording exists (via GET /recordings/{appointmentId}) before deleting. Storage-delete failures also surface as a 400 with the raw storage error message.

Behavior Notes

  • Lookup by appointment: The recording is located by appointment_id.
  • File then record: The stored file is removed before the database record is deleted; the deleted record is returned in data.
  • Confirm first: Deleting when no recording exists returns a 400 error, so verify existence beforehand.