Skip to main content
POST
https://app.medisync.me
/
api
/
recordings
/
add
/
{appointmentId}
Upload Recording
curl --request POST \
  --url https://app.medisync.me/api/recordings/add/{appointmentId} \
  --header 'Authorization: <authorization>' \
  --header 'Content-Type: application/json' \
  --data '{}'
{
  "success": true,
  "data": {
    "_id": "<string>",
    "appointment_id": "<string>",
    "recording_url": "<string>",
    "recording_key": "<string>",
    "createdAt": "<string>",
    "updatedAt": "<string>"
  },
  "error": "<string>"
}

Overview

Uploads an audio recording file for a specific appointment. The recording is stored securely and automatically triggers transcription processing. Only one recording is allowed per appointment.
Only one recording can be uploaded per appointment. If a recording already exists for the appointment, the upload will be rejected.

Authentication

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

Path Parameters

appointmentId
string
required
The appointment ID to associate the recording with (MongoDB ObjectId)
65f8a1b2c3d4e5f6789012f3

Query Parameters

uid
string
required
Doctor’s user ID for authorization

Body Parameters

audio
file
required
Audio recording file to upload
  • Maximum file size: 500MB
  • Supported formats: Various audio formats
  • Content-Type: multipart/form-data

Response

success
boolean
required
Indicates if the recording was uploaded successfully
data
object
The created recording object
error
string
Error message if the upload failed

Example Request

curl -X POST \
  'https://app.medisync.me/api/recordings/add/65f8a1b2c3d4e5f6789012f3?uid=doctor123' \
  -H 'Authorization: Bearer your_jwt_token_here' \
  -F '[email protected]'

Example Response

Success Response
{
  "success": true,
  "data": {
    "_id": "65f8a1b2c3d4e5f6789012f4",
    "appointment_id": "65f8a1b2c3d4e5f6789012f3",
    "recording_url": "https://storage.example.com/recordings/65f8a1b2c3d4e5f6789012f3_recording.wav",
    "recording_key": "65f8a1b2c3d4e5f6789012f3_recording.wav",
    "createdAt": "2024-03-18T10:30:00.000Z",
    "updatedAt": "2024-03-18T10:30:00.000Z"
  }
}
Error Response - Recording Already Exists
{
  "success": false,
  "error": "Recording already exists"
}
Error Response - No File Uploaded
{
  "success": false,
  "error": "No file uploaded"
}
Error Response - No Appointment ID
{
  "success": false,
  "error": "No appointment ID provided"
}

Behavior Notes

  • File Size Limit: Maximum upload size is 500MB
  • Duplicate Prevention: Only one recording per appointment is allowed
  • Automatic Processing: Upon successful upload, the appointment status is updated to “transcribing” and automatic transcription begins
  • Storage: Files are stored securely in cloud storage
  • Security: Requires both JWT authentication and doctor authorization via uid parameter

Use Cases

  1. Medical Consultation Recording: Upload audio recordings of patient consultations
  2. Telehealth Sessions: Record remote medical appointments
  3. Follow-up Appointments: Capture audio for follow-up consultations
  4. Medical Dictation: Upload dictated medical notes or observations