Developer API quickstart
From nothing to a successful API call in about two minutes.
The shortest path to a 200. Every step is explained properly in
Authentication; this page just gets you there.
1. Find your server's public address
The key will only work from the addresses you register, so start there. From the server that will call Medos (not your laptop), run:
curl -s https://checkip.amazonaws.comThat is the address your requests leave from. Behind a NAT gateway or a load balancer it is often not the server's own address. See IP allowlist if you are unsure.
2. Create the key
In the dashboard, Workspace Settings → API Keys → Add API Key:
Create the key and copy the API key (mk_…). It is shown in full once,
so put it straight into your secret manager.
3. Call the API
List the clinic's locations. It needs no parameters and reads no patient data:
curl -s "https://api.medos.one/v1/addresses" \
-H "x-api-key: $MEDOS_API_KEY"Or from Node:
const res = await fetch("https://api.medos.one/v1/addresses", {
headers: { "x-api-key": process.env.MEDOS_API_KEY },
});
console.log(res.status, await res.json());A 200 with your locations under content means everything is wired up: the key
is live, your server's address is on its allowlist, and your plan includes the
Developer API.
What just happened
Three things had to be true:
x-api-key | A live Developer API key |
| Your source IP | On that key's allowlist |
| Your plan | Includes devapi_catalog_addresses, see Entitlements |
Next: read a patient
curl -s "https://api.medos.one/v1/patients?mrn=MRN-0774" \
-H "x-api-key: $MEDOS_API_KEY"An identifier lookup returns a page with
zero or one patient. From the patient's id you can read their
visits,
prescriptions and
documents.
If it didn't work
Errors are problem details. Branch on code:
| Status | code | Most likely |
|---|---|---|
401 | UNAUTHENTICATED | The key is wrong, deactivated, or is an SDK widget key rather than a Developer API key |
403 | IP_NOT_ALLOWED | Your server's address isn't on the allowlist. detail names the address it saw |
403 | FEATURE_NOT_ENTITLED | Your plan doesn't include this route. requiredFeature says which item |
429 | RATE_LIMITED | You're over the rate limit; back off for Retry-After seconds |