Skip to main content
POST
/
appointments
/
add
curl -X POST /appointments/add?uid=doctor_uid_123 \
  -H "Authorization: Bearer your_jwt_token_here" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "General Consultation",
    "date": "2024-03-15",
    "time": "14:30",
    "patient_id": "65f8a1b2c3d4e5f6789012ab",
    "status": "planned",
    "notes": "Initial consultation",
    "language": "de",
    "appointment_type": "in_person"
  }'
{
  "success": true,
  "data": {
    "_id": "65f8a1b2c3d4e5f6789012ef",
    "name": "General Consultation",
    "date": "2024-03-15",
    "time": "14:30",
    "recording_id": null,
    "recording_url": null,
    "recording_key": null,
    "status": "planned",
    "doctor_id": "doctor_uid_123",
    "patient_id": "65f8a1b2c3d4e5f6789012ab",
    "notes": "Initial consultation",
    "language": "de",
    "notes_type": "soap_clinical_notes_de",
    "appointment_type": "in_person"
  }
}

Overview

Creates a new appointment with the specified details. The doctor ID is provided as a query parameter, while other appointment details are sent in the request body.

Authentication

Authorization
string
required
Bearer token for authenticated access
Authorization: Bearer your_jwt_token_here

Query Parameters

uid
string
required
Doctor’s user ID for the appointment

Body Parameters

name
string
required
Appointment name/title
date
string
required
Appointment date
time
string
required
Appointment time
patient_id
string
Patient’s ID (will be converted to ObjectId format if provided)
recording_id
string
Associated recording ID (optional)
recording_url
string
URL to the recording (optional)
recording_key
string
Recording storage key (optional)
status
string
Appointment status. Defaults to “recording” unless set to “planned”
  • planned - Scheduled appointment
  • recording - Audio uploaded or in progress (default)
  • transcribing - Audio being processed
  • processing - AI generating notes
  • finished - Complete workflow
  • error - Processing failed
notes
string
Appointment notes (optional)
language
string
Language code (default: “de”)
notes_type
string
Type of notes (default: “soap_clinical_notes_de”)
appointment_type
string
Type of appointment (default: “in_person”)

Response

success
boolean
Whether the request was successful
data
object
The created appointment object
error
string
Error message (only present when success is false)

Example Request

curl -X POST /appointments/add?uid=doctor_uid_123 \
  -H "Authorization: Bearer your_jwt_token_here" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "General Consultation",
    "date": "2024-03-15",
    "time": "14:30",
    "patient_id": "65f8a1b2c3d4e5f6789012ab",
    "status": "planned",
    "notes": "Initial consultation",
    "language": "de",
    "appointment_type": "in_person"
  }'

Example Response

{
  "success": true,
  "data": {
    "_id": "65f8a1b2c3d4e5f6789012ef",
    "name": "General Consultation",
    "date": "2024-03-15",
    "time": "14:30",
    "recording_id": null,
    "recording_url": null,
    "recording_key": null,
    "status": "planned",
    "doctor_id": "doctor_uid_123",
    "patient_id": "65f8a1b2c3d4e5f6789012ab",
    "notes": "Initial consultation",
    "language": "de",
    "notes_type": "soap_clinical_notes_de",
    "appointment_type": "in_person"
  }
}

Error Responses

{
  "success": false,
  "error": "Invalid UID or Patient ID format"
}
{
  "success": false,
  "error": "Failed to save appointment"
}