Before you start
- An org admin opens Account Settings → API Keys at
app.healos.ai/account-settings in
the test organization and creates a key with these scopes:
patients:read,patients:write,notes:read,notes:write. - Copy the key (it starts with
hlsk_and is shown only once) and keep it in an environment variable, not in your code:
Steps
1
Check which organization the key acts in
200 with data.org.name set to your test organization and
the four scopes above. If it names your live organization, stop and create
a key in the test organization instead.2
Create a fake patient
201 with the new patient in data. Copy data.id (a numeric
string) into PATIENT_ID:409 with existing.id, because
external_id must be unique in the organization. Use that id.3
Find the patient by your own id
200 with a one-item data array. This is how you look up
records without storing HealOS ids.4
Generate a note from text
202 with data.session_id and data.status: "queued". Copy
the session id:5
Read the note
200. data.notes is empty while the note is being written and
holds the note within about a minute. Repeat the call every 10 seconds
until it appears. In production, use a NOTE_CREATED
webhook instead of polling.6
Clean up
200 with { "success": true }. This permanently deletes the
fake patient with its session and note.Expected outcomes
The same flow as a script
The same six calls in JavaScript and Python. Both read the key from theHEALOS_API_KEY environment variable and use only made-up data.
- JavaScript: save as
quickstart.mjsand run it with Node.js 18 or later:HEALOS_API_KEY=hlsk_... node quickstart.mjs. - Python: install requests
(
pip install requests), save asquickstart.pyand run it with Python 3.8 or later:HEALOS_API_KEY=hlsk_... python quickstart.py.
Both scripts send the note request once and never retry it: each call to
POST /notes/from-text creates a new note and uses a Scribe session. See
Going to production for safe retries.Next steps
Recipes
Complete tasks, step by step.
Making requests
Pagination,
external_id and responses.Error catalog
Every status and what to do.

