Authentication
How API keys work, what they can do and how to keep them safe.
Every request is authenticated with an organization API key sent in the x-api-key header.
curl {{API_BASE_URL}}/v1/credits/balance \
-H "x-api-key: uvk_YOUR_API_KEY"What a key is
| Format | Starts with uvk_. |
| Organization | Tied to the organization it was created in. Requests act in that organization only. |
| Permissions | The key acts with the role of the person who created it. It can do exactly what they can do in the Universe app, and nothing more. |
| Expiry | Chosen when the key is created. It can also never expire. |
| Visibility | The full key is shown once, when it's created. Only a hash is stored. |
The key determines the organization for each request.
Create a key
Create keys in the Universe app under Settings → API keys. You need the API key permission, which the owner, admin, editor and member roles have by default.
Create keys from a dedicated account
A key inherits its creator's role, and stops working if that person leaves the organization. For production systems, create keys from a service account with only the role the integration needs.
Rotate or revoke a key
Keys don't rotate automatically. To rotate one, create a new key, deploy it, then delete the old one in Settings → API keys. A deleted key stops working on the next request.
Keep keys safe
- Keep keys on your server. Never ship them in a browser, mobile app or plugin bundle.
- Store them in a secret manager or environment variables, not in source control.
- Use a separate key per system, so you can revoke one without breaking the others.
- Set an expiry for keys used in short-lived projects.
What keys can't do
- Real-time updates. The app's live-progress websockets don't accept API keys. Poll the job instead; see Long-running jobs.