This article is for developers. If you run a clinic and are not integrating other software with Treatlly, you can skip it — nothing here is needed for normal use.
Treatlly offers a small read-only API so the person who builds your website or booking integration can show your clinic's doctors and their open times in their own software. No key exists until you generate one, and it is used by a small minority of clinics.
When you would use it
- Showing your doctors on a website you built yourself.
- Listing a doctor's open times for a date on your own booking page.
If your need is "I want to see my numbers", the built-in reporting is almost certainly quicker than an integration. If you want a clinic website without any development, use the built-in Website section instead.
Getting a key
Only a clinic admin can manage API keys.
- Go to Clinic Settings → API access.
- Press Generate / Rotate Key.
- Copy it immediately. The key is shown once and cannot be retrieved later — if you lose it, generate a new one.
- Store it somewhere your team can retrieve it safely.
The panel then shows the key's status, a masked version ending in its last four characters, and when it was created.
A clinic has one active key at a time. Generating a new key replaces the old one, which stops working immediately — so tell whoever uses it before you rotate. If a developer will use your key for more than one site, they share that one key.
Authentication
Each request carries your key. It identifies your clinic, so every request returns only your own clinic's data. The panel shows exactly how to send the key, with an example request, and links to the full developer reference.
Treat the key like a password
This is the part worth taking seriously. A key gives programmatic access to your clinic's data, which is why only a clinic admin can manage it.
- Never put a key in front-end code, a mobile app, or anything a user can view the source of.
- Never commit one to a shared repository.
- Never send one over WhatsApp or email.
- Rotate it when a developer with access moves on.
If a key may have leaked, press Generate / Rotate Key straight away, or Revoke Key if you want no key active at all. The old one stops working, which is exactly what you want.
What the API covers
Two read-only lists:
- your clinic's doctors, and
- a doctor's open slots for a date you choose.
It does not give access to patients, appointments, payments or anything clinical, and it cannot book anything. If you need more than this, talk to us before building.
Rate limits and good behaviour
Requests are rate-limited to keep the platform responsive for everyone. Poll sensibly — once a minute is plenty for most integrations, and a doctors list rarely needs refreshing more than once a day.
Handle failures gracefully. A network error should be retried with a delay, not hammered.
Mobile applications
Treatlly's own patient and staff apps do not use these keys. If you are trying to build against the mobile apps, that is a different conversation — talk to us.
Getting help
For detail beyond the developer reference, or to discuss an integration before building it, contact us. Tell us what you are trying to achieve rather than which endpoint you want — there is often a simpler route.