Developers

Authentication and scopes

Send a key or an OAuth token as a bearer token. Scopes decide which endpoints answer; data classes decide which fields come back.

Send a bearer token#

Authorization: Bearer claro_sk_live_au_...

Send it to the base URL for the key's region: _au_ keys to https://api-au.claro.clinic/api/public/v1, _us_ keys to https://api-us.claro.clinic/api/public/v1.

Two kinds of credential work:

  • An API key. Made by a clinic admin in Manage → Integrations → Developer tools → API Keys. It reaches that one clinic, and acts as the admin who made it.
  • An OAuth access token. From an OAuth app (authorization code with PKCE), made under Developer tools → OAuth Apps. It acts as the person who approved it, at the clinics they can reach. A full OAuth guide is coming.

A signed-in Claro session is refused: 401 machine_credential_required. The public API is for software, not for the Claro apps.

When a credential stops working#

  • Revoked or rotated in Developer tools, or its OAuth app revoked: 401 invalid_credential on the next request.
  • The person it acts as leaves the clinic: it reaches no clinic, so clinic reads are 403 no_clinic_access.

Scopes#

A scope decides whether an endpoint answers at all. Missing one is 403 insufficient_scope.

ScopeLabel in ClaroUnlocks in v1
none neededGET /clinics, GET /clinics/{id}
patients:readRead patientsGET /patients, GET /patients/{id}, and an appointment's patient
appointments:readRead appointmentsGET /appointments, GET /appointments/{id}
practitioners:readRead practitionersGET /practitioners, GET /practitioners/{id}
events:readRead webhook events (catch-up)GET /events. See catching up.
clinical_content:readRead clinical contentAn appointment's notes, with the clinic's opt-in (below)

Some scopes include others: patients:write and clinical:read include patients:read, and appointments:write includes appointments:read.

Other scopes, such as patients:write, appointments:write and notes:read, exist for writes and resources the public API does not serve yet.

Data classes#

A scope opens an endpoint. The data class decides which fields come back. There are three.

ClassWhat it coversYou need
OperationalClinics, practitioners, appointment times, status and typeThe endpoint's own scope
Clinical metadataWho a patient is: names, date of birth, contact details, address. An appointment's patient.patients:read
Clinical contentWhat was written about care. In v1, an appointment's notes.clinical_content:read and the clinic's opt-in for your app
  • A field you may not see is absent, not null. null always means "nothing recorded".
  • The opt-in is per clinic, per app. The clinic's owner or admin grants it in Manage → Integrations, under Apps that can read clinical content, and can withdraw it at any time. An app can't opt itself in. The Allow button appears only for an app that holds clinical_content:read.
  • Patients need wide access. The person a credential acts as must see all of the clinic's patients in Claro. If not, patient reads are 403 patients_not_visible.

Never returned#

Government identifiers are never returned, whatever the scope: IHI, Medicare and DVA numbers in Australia, and practitioner provider and prescriber numbers. Nor are free-text fields written by or about a patient that are not yet classified.

Every field the API returns is on an explicit allowlist. See Privacy and security.