Keys and scopes
What a key may do, which routes each scope opens, and what a key may never do.
The four scopes, and the routes they open
Every /v1 route declares exactly one scope. A key either holds it or is refused — there is no route that two scopes share, and no scope that implies another. write does not include read.
| read | GET /v1/agentsGET /v1/agents/:publicId/conversationsGET /v1/agents/:publicId/conversations/:visitorGET /v1/usage |
|---|---|
| chat | POST /v1/agents/:publicId/chat |
| write | POST /v1/agentsPATCH /v1/agents/:publicIdDELETE /v1/agents/:publicId |
| handoff | GET /v1/handoffsGET /v1/handoffs/:idPOST /v1/handoffs/:id/replyPOST /v1/handoffs/:id/resolve |
NoteDeliberately coarse
Warningwrite is the one to be careful with
read leaks conversations, which is bad. write leaks the ability to change what the agent is and does — and to create and hide agents. Grant it to the one integration that needs it and nothing else — so that when a key leaks, and one will, the blast radius is that integration.What happens to every request
A key reaches only its own App
A key is created inside one App, and every lookup is made inside it: agents, conversations, the handoff queue. Something that belongs to another App — even on the same account — answers 404, exactly like something that never existed, so ids cannot be probed.
A route with no declared scope refuses everyone
The scope is checked by the guard, not inside each handler. A route that forgets to declare one is refused for every key rather than allowed for every key — a missing declaration is a mistake, and the safe reading of a mistake is “not permitted”.
Creating a key
From API keys in the dashboard sidebar. You need permission to manage the App's settings, and two more rules apply, because a key is standing access that outlives the session that made it.
| You confirm it is you | Your password, or a two-factor code if you have it on. An unlocked laptop is not enough to walk away with a key. |
|---|---|
| It can do no more than you | read and chat need permission to view agents; write needs permission to edit them; handoff needs permission to reply in the inbox. Asking for more is refused. |
| At least one scope | A key with none can do nothing, so it is refused at creation. |
| Expiry | A key that carries an expiry date answers 401 after it, exactly like a revoked one. |
TipWhy the scope cap matters
handoff — and so read an inbox the member could not open themselves. A key is now never a way round your own role.Rules worth following
| One key per integration | Not one per company. When something has to be revoked, you want to revoke the thing that leaked, not everything at once. |
|---|---|
| Only the scopes it needs | A reporting job does not need write. Grant read and it cannot do damage even if it leaks. |
| Name it so a log makes sense | The dashboard shows a key's prefix and when it was last used. A key called “nightly export” that stopped being used last March is a key to revoke. |
| Rotate rather than share | Minting a second key and retiring the first is a few seconds. Passing one around is how it ends up somewhere nobody remembers. |
What is stored
NoteA hash, never the key
How it travels
# Preferred
curl https://api.tigerbase.cloud/v1/agents \
-H "Authorization: Bearer $TIGERBASE_KEY"
# For a caller that cannot set Authorization
curl https://api.tigerbase.cloud/v1/agents \
-H "X-API-Key: $TIGERBASE_KEY"The SDK sends it as a bearer token because that is the header a proxy, a log scrubber and a load balancer already know to treat as a credential. The API also accepts X-API-Key for callers that cannot set an Authorization header.
{
"statusCode": 403,
"message": "This key does not have the \"write\" scope.",
"error": "Forbidden"
}If a key leaks
Revoke it in the dashboard. Revocation is immediate — the next request carrying it is refused. Then mint a replacement and change the environment variable; in that order, so the window where the leaked key still works is as short as you can make it.