Skip to main content
GET
/
recordings
/
{appointmentId}
Get Recordings by Appointment
curl --request GET \
  --url https://api.example.com/recordings/{appointmentId} \
  --header 'Authorization: <authorization>'
import requests

url = "https://api.example.com/recordings/{appointmentId}"

headers = {"Authorization": "<authorization>"}

response = requests.get(url, headers=headers)

print(response.text)
const options = {method: 'GET', 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 => "GET",
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("GET", 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.get("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::Get.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": [
        {}
      ],
      "duration_seconds": 123,
      "file_size_bytes": 123,
      "createdAt": "<string>",
      "updatedAt": "<string>"
    }
  ]
}

Overview

Returns the recording(s) stored for a specific appointment. Recordings are looked up by appointment_id, so the path value is an appointment ObjectId, not a recording id. The caller must be the appointment’s owning doctor. Because only one recording may exist per appointment, the returned data array contains zero or one recording in practice.
The path value is an appointment ObjectId. The endpoint returns the recordings whose appointment_id matches it.

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. Recordings are looked up by appointment_id; the caller must be the appointment’s owning doctor.
665f8a1b2c3d4e5f6789012f3

Response

success
boolean
required
Indicates whether the request succeeded.
data
array
Array of recording objects for the appointment (0 or 1 element in practice).
Additional fields (for example merged_recording, replaced_recording, __v) may appear on the recording object. Treat any field not documented here as opaque.

Example Request

curl -X GET \
  'https://app.medisync.me/api/recordings/665f8a1b2c3d4e5f6789012f3' \
  -H 'Authorization: Bearer <JWT>'
const response = await fetch(
  'https://app.medisync.me/api/recordings/665f8a1b2c3d4e5f6789012f3',
  {
    method: 'GET',
    headers: {
      'Authorization': 'Bearer <JWT>'
    }
  }
);

const result = await response.json();
import requests

headers = {'Authorization': 'Bearer <JWT>'}

response = requests.get(
    'https://app.medisync.me/api/recordings/665f8a1b2c3d4e5f6789012f3',
    headers=headers
)

result = response.json()

Example Response

Success (200) - Recording Present
{
  "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": [],
      "duration_seconds": null,
      "file_size_bytes": 4831200,
      "createdAt": "2026-06-30T10:30:00.000Z",
      "updatedAt": "2026-06-30T10:30:00.000Z"
    }
  ]
}
Success (200) - No Recording On File
{
  "success": true,
  "data": []
}

Error Responses

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

Behavior Notes

  • Lookup by appointment: Recordings are located by appointment_id; the path value is an appointment id.
  • Empty array only for existing appointments: If the appointment exists but has no recording, data is []. If the appointment does not exist, the endpoint returns 404 Appointment not found (not an empty array).
  • Ownership: Only the appointment’s owning doctor may read its recordings; otherwise the request returns 403 Forbidden.
  • At most one recording: Because uploads are limited to one recording per appointment, data holds 0 or 1 element.