Send the key
Every request carries the key in theAuthorization header:
Create a key
Workspace owners open API in the dashboard sidebar and select Create API key, then choose:- A name, so you can tell keys apart, for example
github-actions-shop. - Scopes: what the key may do (below).
- Resources: for applications, databases and object storage, whether the key reaches all of them or only specific ones.
Scopes
Give a key only the scopes it needs. A request outside a key’s scopes is refused with403.
- Applications
- Databases
- Object storage
- Billing
Keys created before the storage scopes were split keep what they could do: a key with
storage:write also has storage:delete and storage:buckets.Limit a key to specific resources
For applications, databases and object storage, a key can reach all of them or only specific ones you choose:- Lists return only the resources the key may reach. Any other resource answers
404, as if it did not exist. - A key limited to specific buckets cannot create buckets.
- Resources created later are not added to the key. Create a new key to include them.
Recommended keys
What keys never see
- Application details include the names of an app’s variables, never their values.
- Database passwords are returned only by
GET /db/{db_id}/credentials, which needsdatabases:credentials.
