Authentication
How to send a Dio API key, who can mint one, what member and admin keys may do, how test keys behave, and what revokes a key on its own.
Every call to the API carries an API key as a bearer token. A key belongs to one workspace, acts with a role fixed when it was minted, and is recorded in the workspace's audit log under its own name.
Sending a key
Send the key in the Authorization header on every request:
GET /v1/me HTTP/1.1
Host: api.getdio.ai
Authorization: Bearer sk_live_...
curl https://api.getdio.ai/v1/me \
-H "Authorization: Bearer $DIO_API_KEY"
A request with no key answers 401, with a detail that says how to authenticate. A key that does not exist and a key that was revoked get the same 401 as each other, so a stolen key cannot be told apart from a mistyped one:
{"detail": "this API key is not valid"}
GET /v1/me is a good first call. It answers with the workspace the key belongs to and the key's own name and role.
Minting a key
Only a signed-in admin can mint a key, in the app at Settings → API & webhooks. A key can never mint, list or revoke keys, so there is no API call that makes one with a key.
When you mint a key you choose:
| Setting | Values | Default |
|---|---|---|
| Name | One line, up to 80 characters. Say what it is for. | Required |
| Role | member or admin. Never more than your own role, and fixed for the life of the key. |
member |
| Mode | live or test. See Test keys. |
live |
| Requests a minute | 1 to 10,000. See Errors and limits. | 120 |
The secret, sk_live_… or sk_test_…, is shown once. Dio stores only a hash of it, so neither you nor Dio can read it again. Put it in your secrets manager before you leave the page. A lost key is replaced, not recovered: mint a new one, deploy it, then revoke the old one.
Keep keys on your servers. Never put one in a browser, a mobile app or anything else you ship to people outside your team.
Member and admin keys
A key acts as the person who minted it when Dio decides who owns a role. A role a key creates belongs to that person, and a member key may change only what hangs off the roles its minter created. An admin key may act on any role.
| A key may | member key |
admin key |
|---|---|---|
| Read every role, interview link, interview, transcript, scorecard and PDF in the workspace | Yes | Yes |
| Create a role | Yes | Yes |
| Create interview links for a role, rename its internal title, delete its interviews | Roles its minter created | Any role |
Read usage, GET /v1/usage |
No | Yes |
| Register its own webhook endpoints | No | Early access |
| Mint, list or revoke keys | No | No |
When a key may not do something, it gets a 403 whose detail says why; for a role, it names whose role it is. Mint an integration's key as member unless it needs one of the admin rows above.
When a key stops working
A key works until it is revoked. An admin revokes a key at Settings → API & webhooks. Revoking a key also disables every webhook endpoint the key registered.
Two changes to a person's membership revoke keys on their own, each with an entry in the audit log:
- Removing someone from the workspace revokes every key they minted there.
- Making an admin a member revokes the
adminkeys they minted. Theirmemberkeys keep working.
The confirmation in the app names the keys either change will revoke. A member key is untouched by any change of its minter's role, so an integration that needs no more than a member key keeps working whatever becomes of the admin who set it up. Before making the owner of an admin key a member, have another admin mint its replacement.
The audit log
Everything a key does is entered in the workspace's audit log under the key's name, not the name of the person who minted it. That includes reads of candidate material: every transcript read, every scorecard PDF download, and scorecard reads once a day for each key and interview. Minting and revoking a key are entered too.
Test keys
Keys minted with the test mode start with sk_test_ and are marked as test keys in every list. Today they behave exactly like live keys: they create real roles and working interview links, and the interviews they lead to are billed like any other.
There is no sandbox yet. Build and test your integration in a workspace no real candidate uses.