Authorization: Bearer header with a valid token.
For CI/CD and scripts, personal API tokens are recommended.
CLI browser/device authentication
Use browser/device authentication for interactive terminal and coding-agent onboarding:akua auth login --no-browser on a remote terminal and open the
displayed URL yourself. The CLI stores the resulting credential locally only
after approval.
The flow uses the
OAuth 2.0 Device Authorization Grant,
so the CLI never handles your account password.
Session credentials
Session credentials back browser-approved interactive sessions: the dashboard, and the CLI afterakua auth login. They are validated server-side on every request.
For non-interactive environments such as CI/CD and scripts, use personal API tokens instead.
Personal API tokens
Personal API tokens are long-lived tokens prefixed withsk_akua_. They’re the recommended approach for CI/CD pipelines, scripts, and automated workflows.
A token belongs to you and acts as you. It never does more than your own roles allow, and you can narrow it further when you create it:
- Workspace: limit the token to one Workspace. It then acts in that Workspace only.
- Roles: limit the token to what a list of IAM roles allows, such as
roles/viewerfor a read-only token. The token may do only what one of those roles includes and what you may do yourself.
Create a token
Create a token from a signed-in session, in the dashboard or with the create endpoint. An API token cannot create another token. The response returns the full token once. Use it with the CLI:List and revoke tokens
Workspace scoping
Many endpoints operate within a Workspace. Select it with theAkua-Context header:
Akua-Context that names another Workspace returns 403 Forbidden. Any other credential calling a Workspace endpoint without Akua-Context also returns 403 Forbidden.
For Workspace discovery, call workspaces.list without Akua-Context to discover all Workspaces you can access, or select a Workspace to list only that one. A Workspace-limited token can discover only its own Workspace.
Security
- Akua never stores plaintext tokens. Tokens are hashed before storage.
- Every API token carries a checksum, so a mistyped or truncated token is rejected at once and secret scanners can recognize Akua tokens.
- Tokens can have an expiration date. Expired tokens are rejected automatically.
- Each token tracks its last used timestamp for auditing.
- A revoked token stops authenticating requests immediately and cannot be recovered.
Related topics
API introduction
Base URL, conventions, pagination, and error codes.
API tokens reference
Manage your API tokens programmatically via the API reference.
CLI
Sign in, select workspace context, and run generated commands.
OpenAPI specification
Download the spec and generate type-safe clients.