Skip to Content
Axel docs
Configure

API tokens

Scripts and agents call Axel's API with a personal access token. A token acts as the person who made it, only within the scopes they gave it, and loses whatever its owner later loses.

Create a token

  1. Sign in, open Account and fill in Personal access tokens: a name, the scopes and how many days it lasts.
  2. Copy the token. It is shown once; Axel keeps only its hash.

Until the web app ships in the install, create one through the API, signed in as Model connections shows:

curl -sS -b axel.cookies -H 'Content-Type: application/json' \
  -d '{"name": "backup check", "scopes": ["admin:read"], "expires_in_days": 30}' \
  https://axel.example.com/api/account/tokens

Use it in the Authorization header:

curl -sS -H "Authorization: Bearer $AXEL_TOKEN" https://axel.example.com/api/account

Revoke a token from the same page. A token stops working when it expires, is revoked, or its owner is deactivated. Changing your password or signing out other sessions leaves tokens working, as API keys keep working on claude.ai, so revoke any token you no longer trust.

Scopes

ScopeAllows
account:readReading your own account, sessions and tokens
account:writeRevoking your tokens
account:securityCreating tokens, changing your password, ending sessions; signed-in sessions only
admin:readReading the licence, notifications, support bundle and model connections
admin:writeDismissing notifications and rerunning model connection checks
admin:securityModel connection and token policy changes; signed-in sessions only, never a token
audit:readReading the audit log

A token gets only scopes its owner's role has, and never account:security or admin:security.

Token policy

Admins set which scopes tokens may carry and their longest lifetime, 365 days by default. A narrower policy applies to existing tokens at once: they lose the scopes it drops, and a shorter lifetime moves their expiry forward.

curl -sS -b axel.cookies -X PUT -H 'Content-Type: application/json' -H 'If-Match: "0"' \
  -d '{"allowed_scopes": ["account:read", "admin:read"], "max_days": 90}' \
  https://axel.example.com/api/admin/token-policy

If-Match is the ETag of GET /api/admin/token-policy; "0" until the policy is first changed.