Guide
Authentication
API keys, scopes, expiry and what a key can see.
API keys
Send the key as a Bearer token on every request:
Authorization: Bearer cvk_3f9a…(48 hex characters)Keys are created by practice administrators in Settings → API & interoperability. A key belongs to the practice, not a person, and is shown only once: ClinicView stores a SHA-256 hash, never the key itself. Choose an expiry (30 days, 90 days, 1 year) and revoke a key there at any time; revoked and expired keys stop working immediately.
API access is part of the plans that include the API access module; keys of a practice without it, or whose subscription is suspended, are refused with 403.
Scopes
Give each key only the scopes it needs:
| Scope | Allows |
|---|---|
| fhir.read | Read patients, practitioners, appointments, encounters, conditions, observations, medication requests and allergies. |
| fhir.write | Create patients. |
| hl7.write | Post laboratory results (ORU^R01) and patient registrations/updates (ADT). |
| hl7.read | Collect laboratory orders (ORM^O01). |
What keys never see
Records of restricted (VIP) patients, confidential psychotherapy notes, draft prescriptions and pending laboratory results are never returned through the API, whatever the scopes.
Keep keys safe
Keep keys on your server, never in a browser or mobile app. Use one key per system so you can revoke it alone. Rotate keys before they expire: create the new key, deploy it, then revoke the old one.