Skip to main content
POST
/
api_tokens
Create an API token
curl --request POST \
  --url https://api.akua.dev/v1/api_tokens \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "My CLI token",
  "expires_at": 1742169600
}
'
{
  "id": "<string>",
  "workspace_id": "<string>",
  "name": "<string>",
  "token": "sk_akua_a3b2c4d5e6f7g8h9i0j1k2l3m4n5o6p7"
}

Documentation Index

Fetch the complete documentation index at: https://docs.akua.dev/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

workspace API token (sk_akua_...) or OAuth2 JWT. Create tokens at https://akua.dev/developers/api-tokens

Headers

akua-context
string

Optional workspace/scope context for the request. Carries a single workspace wire id (ws_…) today. Only needed for broad tokens — a workspace-owned token implies its workspace.

Required string length: 1 - 53
Example:

"ws_j572abc123def456"

Body

application/json
name
string
required

Human-readable name for the token

Required string length: 1 - 100
Example:

"My CLI token"

expires_at
integer | null

Unix timestamp (seconds) when the token expires. Omit or pass null for no expiry.

Required range: x >= 0
Example:

1742169600

Response

Token created. The token field is shown only once.

id
string
required
Required string length: 1 - 54
workspace_id
string
required
Required string length: 1 - 53
name
string
required
token
string
required

The full token. This is shown only once - store it securely.

Example:

"sk_akua_a3b2c4d5e6f7g8h9i0j1k2l3m4n5o6p7"