Before you start
You must have theowner or admin role. A member sees the cards without the buttons.
The two keys
Settings → API holds exactly one key of each type. Which one you need depends on whether you’re reading data or writing events.
Neither key belongs in browser code. Browser and mobile installs carry the public
workspace ID from Settings → General instead, which is safe to ship.
A key authorizes exactly one workspace. If a response looks like someone else’s data,
you’re holding another workspace’s key.
Generate a key
- Open Settings → API.
- Find the card for the key you need.
- Select generate key.
- Confirm in the dialog.
- Copy the full value from the one-time dialog.
- Store it in an environment variable or a secret manager.
Copy the value before you close the dialog. We store a hash for lookup and never show
the full value again, so the card afterwards shows only a masked preview such as
dk_agent_••••••••a1b2.Rotate a key
- List every service that holds the current key.
- Select regenerate on the card.
- Confirm in the dialog.
- Copy the new value from the one-time dialog.
- Update the secret in every environment.
- Redeploy or restart those services.
Verify
Run one authenticated request with the new key:200 response naming your workspace proves the key works. See
Authentication for the full 401 body.
If a key leaks
- Select regenerate on the affected card immediately.
- Update every consumer with the new value.
- Review your own service logs for requests you did not make.
When it doesn’t work
Next
- Authentication: how
/v1reads the header. - Read API: the sixteen endpoints the Agent key unlocks.
- Connect Claude or Codex: read your data with OAuth and no stored key.