User ID (usr_...) or me for the authenticated user.
Request body.
Optionalexpires_in_days?: numberLifetime in days. One of 7, 30, 60, 90, or 365. Defaults to 30.
Optionalname?: stringHuman-readable label for the token (e.g. "Codex MCP"). Stored as metadata only.
Optionalscopes?: string[]Optional OAuth scopes to stamp on the token. Omit for full_access.
The newly created access token. The token field contains the raw JWT and is present only in this response — it is not stored and cannot be retrieved later.
Revoke a personal access token
Permanently revokes the specified access token belonging to the
authenticated user. Once revoked, the token is immediately rejected by
all API endpoints and cannot be reinstated. The token record is retained
and returned in the response with revoked_at populated.
The caller must be the user identified by user and must present a
first-party session (or a full_access access token). Returns 404 if
the token does not exist or does not belong to the caller.
User ID (usr_...) or me for the authenticated user.
Access token ID (sat_...). Must belong to the authenticated user.
The revoked access token. The revoked_at field is populated with the time of revocation.
List personal access tokens
Returns all access tokens associated with the authenticated user, including
active and revoked tokens. Tokens are returned without their raw JWT values
— the plaintext JWT is only available at creation time.
The caller must be the user identified by user and must present a
first-party session (or a full_access access token).
User ID (usr_...) or me for the authenticated user.
Successful response
Create a personal access token Issues a new long-lived access token for the authenticated user. The raw JWT is returned in the
tokenfield of the response exactly once and cannot be retrieved again — store it securely immediately after creation.scopesis optional. When omitted the token receivesfull_access. Known catalog scopes (for exampleprofile) restrict the token through the sameScopeGuardused by OAuth.expires_in_daysis optional and must be one of7,30,60,90, or365. When omitted the token lasts 30 days. Each user may hold at most 50 active tokens; exceeding that limit returns 429. The caller must be the user identified byuserand must present a first-party session (or afull_accessaccess token). A restricted access token cannot mint another token.