Create a key
To create a key, you need one of these:- A browser session:
boat loginwith no key, or the dashboard. - A key with the
account.adminaction, or anadminkey. The new key cannot have more actions, more sandboxes or a later expiry than this key.
POST https://boat.dev/api/v1/api-keys/scoped.
During a credential rollout, boat can turn off key creation for a short time.
GET /api/v1/api-keys reports this in catalog.scopedCreationEnabled. While creation is off, the create endpoint returns a typed 503.
A key that never expires is still a scoped key. If it leaks, it works until you revoke or rotate it. Read Store, rotate and revoke.
For the actions and presets, read Scopes.
With the API:
name, ttl, preset or actions, sandboxIds and environmentIds.
Pass at least one non-empty scope field. Full account access requires "preset":"admin".
boat shows the secret one time only. In scripts, capture it like this:
Use the key
What a key cannot do
- Create needs a browser session or an admin-scoped token. A credential that can make more credentials defeats least privilege.
- Rotate and revoke need a browser session or a key that can create keys. Such a key can rotate or revoke itself and any key that it could create.
- To approve an agent claim, you need a browser session. API keys cannot approve agent claims. This includes admin keys and legacy keys.
boat api-key create|rotate|revoke, or use the API Keys tab.
List
The CLI, the API, the SDKs and the dashboard can list keys. boat never returns the secrets. Each row shows:- The id, the name, the prefix and the last four characters
- The scope and the expiry
- The last use
- The request total for the last 30 days
- How many sandboxes and Agents the key created that still exist
--sandbox or --env gets an empty apiKeys list. A browser session, a CLI session or a key with no such limit gets the full list.
TypeScript
Python
See usage for one key
boat api-key usage <id> prints the 30-day request total and the count of live resources. These are the same numbers as in the list.
- Add
--verboseto see the split between sandboxes and Agents, and the list of created resources. - The matching API is
GET /api-keys/{id}/usage. - Usage still works after you revoke the key, if you still have the id.