Docs
Open the console →
API reference

API reference: API tokens

Cloud Control API-token management: list your org's tokens, create a cc_pat_ token with a role ceiling and expiry (secret shown once), and revoke a token. Session-only.

Manage cc_pat_… API tokens. Token administration requires a session — a Bearer-authenticated request here gets a 403. Members see their own tokens; org admins see the whole org's.

GET/api/org/tokensSession only

List tokens (yours; org-wide for admins). Never includes the secret.

Example response
json
{ "tokens": [ { "id": 3, "name": "inventory-export", "role": "Viewer",
  "createdAt": "2026-07-10T…", "expiresAt": "2026-08-09T…", "lastUsedAt": "2026-07-18T…",
  "revokedAt": null, "mine": true, "creator": { "name": "Ada", "email": "ada.lovelace@example.com" } } ] }
Errors
StatusWhen
401Not signed in.
403Authenticated with a Bearer token (tokens can't manage tokens).
POST/api/org/tokensSession only (role ≤ your capabilities)

Create a token; the secret is returned exactly once.

Parameters
NameInRequiredDescription
namebodyyes1–60 characters.
rolebodyyesOne of the assignable org roles; not above your own capabilities.
expiresDaysbodynoDefault 30, up to 365, or null for no expiry.
Example request
json
{ "name": "ci-reader", "role": "Viewer", "expiresDays": 30 }
Example response
json
{ "ok": true, "secret": "cc_pat_…", "token": { "id": 4, "name": "ci-reader", "role": "Viewer" } }
Errors
StatusWhen
400Bad name, unknown role, or bad expiresDays.
403Bearer-authenticated, or the role exceeds your capabilities.
DELETE/api/org/tokens/{id}Session only

Revoke a token. Revoked (and expired) tokens then authenticate as 401.

Parameters
NameInRequiredDescription
idpathyesToken id in your org.
Example response
json
{ "ok": true }
Errors
StatusWhen
403Bearer-authenticated.
404No such token in your org.