v34

latestOpenAPI 3.1.0AGPL-3.0-onlyraw.githubusercontent.com2026-08-018932140.9 KB
API Tokens

Create API token

Generates a new scoped API token. The full token is only returned in the creation response and cannot be retrieved again. Requires admin role.

Note: API tokens cannot create other API tokens.

post/api/api-tokens

Request body

namestring required

Human-readable token name. Must be unique among the user's active tokens.

scope'read-only' | 'deploy-only' | 'full-admin' required

Permission scope:

  • read-only — GET requests only
  • deploy-only — Read + stack deploy/stop/restart operations
  • full-admin — All operations (except license, user, and token management)
expires_in30 | 60 | 90 | 365 | null nullable

Token lifetime in days. Use null for no expiry.

Example request

{
  "name": "CI/CD Deploy Token",
  "expires_in": 90
}

Response

Token created. The token field contains the full JWT. Save it now; it will not be shown again.

idinteger required
tokenstring required

Full JWT token. Store securely — this is the only time it's returned.