Settings - API Token
API token generation and revocation for CLI and MCP access.
📄️ List API Tokens
List metadata for the authenticated user's API tokens, including name, creation date, and expiration date. The token values themselves are never returned.
📄️ Generate API Token
Create a bearer API token for the authenticated user with an optional name and expiration date (ISO format; omit for a 90-day default, at most 365 days ahead). Only a signed-in web session may call it: an API token is refused with 403. Limited to 10 tokens per hour per user (429). Returns 201 with the token value, or 400 when the expiration date is invalid, not in the future or beyond the maximum lifetime.
📄️ Revoke API Token
Revoke one of the authenticated user's API tokens so it can no longer be used. The path takes the token_id from the list (preferred), the literal 'self' (logout: revokes the API token that makes this call; a web session gets 400), or a token name (deprecated: revokes every token with that name). Returns 204 on success and 404 when nothing matched.