On this page
Two kinds of tokens#
| Personal token | Organization token | |
|---|---|---|
Created by |
Any member, for themselves |
Member with Organization API tokens: change |
Acts as |
Owner |
Organization |
Roles |
Admin, viewer or user (+ custom), within owner’s rights |
Same, within creator’s rights |
Limited by |
Owner’s current permissions |
Responsible member’s permissions |
Secret prefix |
prn_pat_ |
prn_oat_ |
Where |
Profile → API tokens |
Admin → API tokens |
Requests intersect token roles with the member’s current permissions: lowering roles narrows tokens immediately, raising never widens them. Use a custom role (e.g. Deploy) for single-job CI tokens.
On this screen#
| Element | What it shows or does |
|---|---|
New token / New organization token |
Opens token form. |
Search by name or member… |
Filters tokens. |
State, Member, Longer than policy, Order |
Filters and sort (Newest first). |
Columns |
Name (kind + prefix, e.g. prn_oat_…0j3o), Role, Status, Member, Created, Expires, Last used. |
Actions menu |
Replace secret, Revoke, Take over (org tokens). |
| Field | What it sets |
|---|---|
Name |
Label (e.g. CI deploy pipeline). |
Role |
User, Viewer or Admin (within your rights). |
Custom role |
Optional custom role (within your rights). |
Allow security changes |
Admin or security-management roles (Security changes). |
Allow token management |
Manages tokens within own scope and expiry. |
Allow reading credentials |
Reads credentials you can reveal (Reading credentials). |
Allow installation administration |
Installation admins, personal tokens only (Rights for AI agents). |
Accepted from networks |
Allowed IPv4/IPv6 or CIDRs, one per line (empty = all). |
Expires in |
Lifetime within org limits. |
Create, rotate and take over ask for MFA if enrolled. Secret shows once (show icon, Copy, curl with PRINCIPAL_TOKEN). Only its hash is stored.
States and statuses#
| Status | Meaning |
|---|---|
Active |
Works normally. |
Revoked |
Permanently stopped (also revokes replacements rotated after page load). |
Expired |
Lifetime ended. |
Limited |
Member or role lost permissions. |
Inactive |
Owner left org (revoke) or responsible admin lost access (Take over). |
Replaced |
Superseded by new secret. |
Disabled / Disabled for lack of use |
Permanently disabled after inactivity (30d default, error unused). |
Longer than policy |
Predates shorter limit. Shows stop date if enforced. |
Capped by policy |
Policy limit enforced. Shows stop time. |
Created with another token |
Revoked with issuer. Create new on expiry instead of rotating. |
Reads credentials |
Has Allow reading credentials. |
Last used |
Last call time and IP (at most once/min). New networks emit API token used from a new network (Notification channels). |
| Action | What it does |
|---|---|
Replace secret |
Rotates secret immediately with same metadata (needs all role permissions). |
Revoke |
Stops token immediately. |
Take over |
Transfers org token responsibility before its member leaves. |
Bulk actions confirmed with a token#
- Bulk actions and template bulk applies re-check the confirming token per row. Revoking, rotating, expiring, disabling or deactivating stops unstarted rows (done rows stay) and logs why in Activity.
- Rotate only when idle. Retry stopped actions via console or valid token.
- Rows use member permissions (narrowing token mid-run continues). Console actions are unaffected.
Organization limits#
Admin → Organizations → org → API tokens (defaults keep existing tokens unchanged).
| Setting | Default | What it does |
|---|---|---|
Default token lifetime |
30 days |
Pre-selected in dialog. |
Longest token lifetime |
90 days |
Max for new/rotated tokens (up to 366d). |
Longest lifetime with security changes |
7 days |
Max with Allow security changes. |
Require networks for new tokens |
off |
Requires Accepted from networks. |
Disable tokens unused for |
30 days |
Permanently disables idle tokens ( 0 off). |
Apply the longest lifetime to existing tokens |
off |
Caps existing tokens (save previews tokens, or counts without org-token view). |
Child tokens stay within issuer networks, expiry (including policy caps) and inactivity state.
Addresses behind a proxy
Network checks and Last used from use backend client IP (Deployment).
What a token cannot do#
Single-org only. Cannot sign in to console, edit own MFA, stream live events, approve connector syncs, create orgs (org tokens) or inherit scopes (audit:read). Needs flags below for credentials, token management, security changes or installation admin.
Rights for AI agents#
Use AI agents for standard MCP agents (hidden in personal API tokens, marked AI agent in org list). Create a token here only for extra rights (MCP).
- Allow token management: manages tokens within equal/narrower scope and expiry. Children revoke with parent (Created with another token).
- Allow installation administration: installation admins, personal only, max 30d. Opens health, maintenance, cross-org audit, upgrade checks and install ops. Snapshots rights at issuance (revoke if removed in IdP, or Replace secret to refresh).
Keep lifetimes short
Installation admin can enable maintenance mode and read cross-org audit. Token management can mint copies (revoked with parent).
Security changes#
Step-up console actions require Allow security changes (else 403 auth.api_token_not_allowed):
- Org security policy, required MFA and SSO-skip trusted networks.
- Member passwords, reset links, external sign-in links/confirmations/removals and email changes.
- Resetting/unlocking MFA and Require from this person.
- Service account trusted tokens (Token exchange).
- Granting admin or security-management roles to members, groups or custom roles (including bulk actions).
- Creating/editing connectors and saving sign-in page (also needs installation admin).
- Auto-linking an unlinked person by external ID (use person ID instead).
Off by default, needs security-management role, checks MFA once at issuance (kept on Replace secret/Take over). Cannot manage tokens or reset/unlock own MFA.
Treat like an admin session
Can change another member’s password or MFA and sign in as them. Keep expiry short.
Reading credentials#
Requires Allow reading credentials (not implied by Allow security changes). Personal reads owner’s, admin reads any member’s. Others get 403 auth.api_token_not_allowed (api_token_credentials_read_not_allowed).
Needs active MFA to create/rotate (else 403 mfa_enrollment_required). Reads audit under token name and count toward hourly limit (Security policy).
Stands in for MFA
Grant sparingly, keep expiry short, subscribe to Credentials revealed and Reveal limit reached. Agent sign-in issues these via cluster key.
Tasks on this screen#
- Create an API token
- Replace or revoke an API token
- Connect an AI agent through MCP
- Give a CI pipeline a token that does one job
Related#
In the API#
Personal: GET /api-tokens, POST /api-tokens, POST /api-tokens,
DELETE /api-tokens. Organization: GET /api-tokens,
POST /api-tokens, POST /api-tokens. Limits:
GET /api-tokens, GET /api-tokens, api_tokens in
PUT /organizations.