Access Tokens

Access tokens are organization-scoped bearer tokens for CLI-style and headless surfaces. Each token has a memorable name, optional scopes, an optional expiration, and an audit trail of last use. Tokens are stored as SHA-256 hashes. The plain token is returned only on creation and rotation.

Base URL

Endpoints

Scopes

Scopes restrict what the token can do. Common values include:
  • admin or owner — full organization admin access
  • cli:read
  • cli:write

Create an access token

Request body

Response

Save the token immediately. It cannot be retrieved later.

List access tokens

Response

Get an access token

Response

Revoke an access token

Response

Revoked tokens can no longer authenticate.

Rotate an access token

Response

Rotation issues a new token, updates the prefix, and clears any previous revocation.

Authenticate with an access token

The token is authenticated by hashing the bearer value and matching it against stored hashes. On success, last_used_at is updated.

Error codes