Skip to main content
POST
Book an appointment

Authorizations

Authorization
string
header
required

Marketplace API key

Headers

idempotency-key
string

Client-generated UUID. Strongly recommended: on a live calendar a duplicate appointment is worse than a slow response. Sending it is also a request for exactly-once — if that cannot be honoured the write is refused (503 idempotency_unavailable) rather than downgraded.

x-session-token
string

The App Bridge token of the logged-in user (maxcare.appToken()), verified for this app and organization. With it the change is made through that user's own EHR login when they have a usable one; without it, through the organization's system login (meta.resolvedBy says which). A token that does not verify is 401 authorizer_unverified. Sent as a header so it stays out of URLs.

X-Organization-Id
string
required

Target clinic organization ID

Body

application/json
patientId
string
required

Patient ID (pat_…)

providerId
string
required

Provider ID (prv_…)

facilityId
string
required

Facility ID (fac_…)

appointmentTypeId
string
required

Appointment type ID (atp_…)

startsAt
string
required

Start instant, ISO-8601 with an explicit offset

Example:

"2026-08-03T08:00:00-04:00"

durationMinutes
number
required

Appointment length in minutes

Example:

15

newPatient
boolean
required

Whether this is a new-patient visit. Both EHRs distinguish it, and it changes the EHR-side workflow.

Example:

true

visitReasonId
string

Visit reason ID (vrs_…). Only meaningful on EHRs where /visit-reasons reports supported: true.

holdId
string

Hold ID (hld_…) taken from POST /schedule/holds

templateId
string

Availability template ID (avt_…) from the chosen slot's templateIds. On ModMed this pins the appointment to that calendar preference so it consumes the right window's capacity.

notes
string

Patient-supplied comment

Example:

"Patient comment text"

reasonForVisit
string

Why the patient is being seen, written to the EHR's own reason-for-visit field (never to notes). ModMed only: check reasonForVisit on GET /schedule/capabilities; other EHRs refuse it with capability_unsupported.

Maximum string length: 2000
Example:

"Changing mole on left forearm, referred for evaluation"

referringProviderNpi
string

NPI of the referring provider, attached to the appointment as its referral. ModMed only (see referringProviderNpi on GET /schedule/capabilities). On ModMed the NPI is added to the practice's referral directory from the NPI registry when missing; an NPI that cannot be resolved does not fail the booking, it is booked without one.

Pattern: ^\d{10}$
Example:

"1255374757"

source
object

Booking attribution, echoed back on read. Use this instead of prefixing appointment notes — notes are a clinical field and get read aloud at check-in.

Response

Success

code
string
required

Response code

Example:

"success"

data
object
required