Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/bentlyy/Clinica/llms.txt

Use this file to discover all available pages before exploring further.

Creates a new appointment for the authenticated patient. Before inserting the record, Clinica checks that the requested slot falls within the doctor’s weekly availability window, is not blocked by an exception on that date, and does not overlap with an existing booking. A confirmation email is sent to the patient asynchronously after a successful booking.

Request

POST /api/bookings — requires a patient JWT.

Headers

Authorization
string
required
Bearer token. Format: Bearer <token>

Body

doctor_id
integer
required
ID of the doctor to book an appointment with.
date
string
required
Appointment date in YYYY-MM-DD format.
time
string
required
Appointment start time in HH:MM (24-hour) format. Must fall within the doctor’s availability window for that day.
duration
integer
default:"30"
Appointment length in minutes. Maximum 480. Defaults to 30.

Response

Returns the created booking object.
id
integer
Unique booking ID.
doctor_id
integer
ID of the booked doctor.
user_id
integer
ID of the patient who created the booking.
date
string
Appointment date (YYYY-MM-DD).
time
string
Appointment start time (HH:MM).
duration
integer
Appointment length in minutes.
curl --request POST \
  --url https://your-clinica-host/api/bookings \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
    "doctor_id": 3,
    "date": "2026-05-15",
    "time": "10:00",
    "duration": 30
  }'
{
  "id": 42,
  "doctor_id": 3,
  "user_id": 7,
  "date": "2026-05-15",
  "time": "10:00:00",
  "duration": 30
}

Build docs developers (and LLMs) love