Create a key
An owner or admin of the practice creates keys in Settings → Integrations → API keys, with the permissions the key needs:
The key is shown once, when you create it. Copy it into your server’s secret storage right away. If it’s lost,
revoke it and create a new one.
A key starts with
db_live_ and an 8-character id, such as db_live_k7f3a9c2_, followed by the secret part.
Settings → Integrations → API keys shows that start next to each key’s name, so you can tell keys apart; the secret part is
never shown again. Keys created before October 2026 start with af_ and keep working until they expire or you
revoke them.
Keep it on your server
The key acts for your whole practice. Use it only from your own server:- Never put it in a web page, a mobile app or a browser script. The API is server to server and doesn’t answer browser (CORS) requests.
- Never commit it to source control.
Expiry, revocation and rotation
- Keys expire one year after they’re created. Settings → Integrations → API keys shows each key’s expiry date, and the practice’s owners and admins get an email 30 days before a key expires.
- Revoke a key any time in Settings → Integrations → API keys; it stops working right away.
- To rotate, create the new key, switch your system over, then revoke the old one.
401. A key without the scope an endpoint needs, or a key of an account that is suspended or deactivated, gets 403. See
Errors.