Upsert a patient by externalId. Idempotent.
List patients, or look one up by ?externalId=.
Fetch one patient by our id.
Update the editable subset (never phone/externalId).
Everything a patient-facing screen needs, in one call.
Create a physician + backing portal account. Identical repeat (same
externalId + same email) → 200, idempotent; same externalId with a
different email → 409 external_id_conflict; new externalId with an
in-use email → 409 email_in_use.
List physicians, or look one up by ?externalId=.
Fetch one physician by our id, or me for the acting one. Physician session: me only.
(Re-)send the portal invitation email.
Toggle async auto-assignment eligibility. Self-only with a physician credential. Physician session.
Mint a physician SESSION token for browser-direct calls (see "Acting as a
physician"). Tenant key only — a session may not mint another (403 forbidden).
Go on/off the live video queue; ready: true matches immediately. Self-only.
Physician session.
Keep a ready physician on the rota — every 15 s, TTL 45 s. Self-only.
Physician session.
The whole clinician screen in one read: presence, live queue, active call, upcoming appointments, inbox. The polling target. Physician session.
Booked appointments in a window (default now → +7 d, max 31 d). Physician session.
Replace the specialties a physician covers (slugs from GET /v1/specialties;
unknown ones are dropped). Self-only with a physician credential. Physician
session.
Replace the languages a physician consults in (base codes from
./languages; a full locale such as fr_CH is 400 invalid_request).
A ranked routing preference, never a filter — a physician with none
recorded still receives consults, last. Self-only with a physician
credential. Physician session.
The tenant's specialty catalogue. Physician session.
Send a patient turn to the AI agent (202, FIFO-enqueued). Answered by the agent unless a human clinician already owns an open consult for this patient, in which case the turn is routed to them.
Read/poll the patient's agent conversation, oldest first.
Mint a session token for the <natzar-agent> widget (patient-scoped).
Start an async consult. 409 has_open_thread / feature_disabled.
List async consults, most recently active first. assignee=me|unassigned|<id>
and origin filter the physician's view. Physician session.
Fetch one async consult. Tenant-scoped with a physician credential. Physician session.
Page the consult transcript, oldest first. Physician session.
Post a patient message (202, FIFO-enqueued). Tenant key only — not a physician-session route.
Post the assigned physician's reply (202, FIFO-enqueued). Physician credential required. Physician session.
Assign a queued consult to the acting physician. Physician session.
Reassign an active consult after an SLA breach. 409 sla_not_overdue before. Physician session.
Mark the consult resolved (assignee only). Physician session.
Close an open consult — administratively, or on the patient's behalf. With a physician credential: assignee only, tenant-scoped. Physician session.
The assignee turns the thread into a live video consult: closes it as
escalated, opens a telehealth consult for the patient, sends them the
link. Physician session.
Record the PATIENT's consent answer to an invite (accept or decline).
Record the PATIENT's rating of a finished consult. Write-once.
Mint an embed session token for the async chat widget.
Presign attachment upload slots in the patient's staging area.
Start a live video consult. 409 feature_disabled when not enabled.
List telehealth consults, newest first. status, practitionerId (me),
mode and origin filter the physician's view. Physician session.
Fetch one telehealth consult (fresh recordingUrl when available). Physician session.
Mint an embed session token for the video widget.
Cancel before the call starts (invited/scheduled/waiting only). With a
physician credential on a booked consult: the clinician cancels their own
appointment and the patient is told (reason relayed). Physician session.
The PHYSICIAN's way into their call: the LiveKit grant once in_progress.
Requires a physician credential naming the practitioner (409 not_assigned). Physician session.
Hang up. The physician goes back to ready (or offline with
goOffline) and the queue is re-matched at once — next is the patient
now ringing. Idempotent once completed. Physician session.
The booked physician's waiting-room presence for a scheduled consult
(the twin of the patient's /join); call every ~10 s. Starts the call
when both sides are present in the window. Physician session.
The patient's waiting-room heartbeat AND read: enters/holds the queue and returns position, or the LiveKit credentials once the call starts. Call every ~10s while the patient is watching.
Record the PATIENT's post-call rating. Write-once.
The bookable times for a scheduled consult: every published availability
window of every physician who covers its specialty, minus what is already
taken, clipped to the tenant's lead time and booking horizon.
Identical starts from different physicians collapse into ONE offer. That is
deliberate: the patient picks a TIME, not a person, and book chooses the
least-loaded eligible physician within the language tier — the patient's
language first, then English, then anyone. practitionerIds is exposed
so a surface that genuinely needs to pin one can, not so every surface
should; each offer's languages and the response's patientLang let a
grid badge the times a French speaker is preferred for.
Take one of the offered slots. ATOMIC: the reservation is a conditional
write, so two requests for the same start cannot both succeed — the loser
gets 409 slot_taken with a fresh slots array attached, ready to render.
Calling this on a consult that is ALREADY booked reschedules it: same consult, same id, same embed session, a different time.
Replace a physician's WHOLE schedule — every rule and every exception,
whatever its date — with the one sent: the availability patients book
against. A replace, not a merge, for a caller that owns the rota (an HR or
rostering system): send the schedule you want to exist, and it becomes
the schedule. Calendar-style edits use PATCH instead. Self-only with a
physician credential. Physician session. Query: from/to shape the
response range.
Apply a CHANGE SET to a physician's schedule — create, update and delete
individual rules and exceptions by id, leaving everything else exactly as
it was however far ahead it lies. The way a calendar edits: "block the
14th", "end this pattern in March", "extra hours next Saturday" are each
one small PATCH. diffSchedule in ./schedule produces the body from an
edited document. Self-only with a physician credential. Physician
session. Query: from/to shape the response range.
Read a physician's schedule: the whole rota, the exceptions and the
resolved days over from..to (query; default today → the planning
horizon), plus how far the tenant asks them to publish. Physician session.
Replace a physician's STATE LICENCES — the jurisdictions they may practise in. A whole-list replace, like the schedule.
Only consulted by tenants with licence enforcement switched on; for everyone else these are recorded and ignored. With it on the constraint is hard in both directions: no licence for the patient's state means the physician is not offered the consult, and no licences at all means they are offered nothing. Self-only with a physician credential. Physician session.
Read a physician's licences, with the ones lapsing soon called out. Physician session.
Page the durable webhook replay log, oldest first.
The machine-readable route table: every Partner API route mapped to its request and response types.
Keys are
METHOD /v1/pathwith{id}marking the path parameter (always our id of the addressed resource). For GET routes,requestis the QUERY shape; for body-carrying methods it is the JSON body.undefinedmeans the route takes no query/body.Useful for building typed clients:
Example