List API keys
const url = 'https://example.com/v1/tokens?limit=25';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'https://example.com/v1/tokens?limit=25' \ --header 'Authorization: Bearer <token>'Newest first. Never returns secrets. A tenant admin sees every key (?principal= for one principal’s); anyone else sees their own.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”Where the previous page ended: its nextCursor, as it came. A runtime that seals cursors takes one only for the same list, filters and caller, within a day; otherwise 400 bad-input, and the list starts again without it. Absent → first page.
1..100. Default 25.
Tenant admins: only this principal’s keys, user:<id> or service-account:<id>.
Responses
Section titled “Responses”A page of keys.
object
An API key. Never includes the secret. principal is whom it acts for; absent on a key that is a service account of its own (service_account:<tokenId>), as keys minted before principals are.
object
Whom an API key acts for: a person, or a service account.
object
The user id, or the service account id.
The most the key may do, under its principal’s grants: an admin key may administer the tenant when its principal is a tenant admin; a member key takes no admin action on the tenant, whoever it’s for; below it, its principal’s roles hold (a project admin’s member key administers that project).
Framework capabilities the key carries (env:write, secrets:write, …). A caller can only grant capabilities it holds.
The project the key is limited to.
Who minted it: user:<id> or service_account:<id>.
Set once revoked; a revoked key never authenticates again.
When the key last authenticated a request (updated at most once a minute).
Opaque cursor for the next page. Absent when hasMore: false.
Example
{ "data": [ { "principal": { "kind": "user" }, "role": "admin" } ]}Malformed cursor or principal.
object
object
Stable machine-readable discriminant. Values match domain error codes (see docs/API-ROUTE-CONVENTIONS.md §4.3).
Optional, kind-specific.
object
Server-assigned request id; also echoed via X-Request-Id header.
Examplegenerated
{ "error": { "code": "example", "message": "example", "details": {}, "requestId": "example" }}Missing / malformed / expired / revoked bearer token.
object
object
Stable machine-readable discriminant. Values match domain error codes (see docs/API-ROUTE-CONVENTIONS.md §4.3).
Optional, kind-specific.
object
Server-assigned request id; also echoed via X-Request-Id header.
Examplegenerated
{ "error": { "code": "example", "message": "example", "details": {}, "requestId": "example" }}A caller with no keys of its own that is not a tenant admin.
object
object
Stable machine-readable discriminant. Values match domain error codes (see docs/API-ROUTE-CONVENTIONS.md §4.3).
Optional, kind-specific.
object
Server-assigned request id; also echoed via X-Request-Id header.
Examplegenerated
{ "error": { "code": "example", "message": "example", "details": {}, "requestId": "example" }}