| title | Authentication |
|---|---|
| description | Authenticate API calls with an API key, and limit what the key can do. |
Send your API key as a bearer token on every request:
curl "{{apiBaseUrl}}/my/spaces" \
-H "Authorization: Bearer $DECKFLOW_API_KEY"An API key belongs to a user. It inherits that user's current permissions in every space they belong to, so removing the user from a space also removes the key's access.
| Property | Behavior |
|---|---|
| Format | The secret starts with dbk_. |
| Scope | read or write. A read key can search and read. A write key can also create, change, and delete. A few calls that sound like reads are writes, such as answers and file.download. |
| Expiry | Optional. Set an expiry time for keys used in short-lived jobs. |
| Secret | Shown once, when you create the key. DeckFlow stores a digest and cannot show the secret again. |
| Revocation | Revoke a key on the API keys page of your account. It stops working at once. |
A key can list your spaces, read space details, and call the library, search, conversion, share page, and album methods in the API reference.
A key cannot manage API keys. Create and revoke keys while signed in to the web app.
| Status | Meaning |
|---|---|
401 |
The credential is missing, invalid, expired, or revoked. |
403 |
The key is not allowed to call this method, or a read-only key attempted a write. |
404 |
The resource does not exist, the key's user cannot see it, or the user's role does not allow the action. |
- Load keys from environment variables or a secret manager. Keep them out of source control and client-side code.
- Create one key per application or agent, so you can revoke one without affecting the others.
- Prefer the
readscope and add an expiry when the job has an end date.
{/* TODO: add screenshots of the API keys page. /} {/ TODO: document rate limits. */}