Search documentation

Search the Fumadocs-backed documentation index.

ax api-key

List and revoke API keys.

Keys authenticate the CLI and the HTTP API. Minting happens on the platform settings page or via ax auth login; the CLI only lists and revokes. Secrets are never returned, only masked ids and metadata.

CommandUse
api-key listList keys (masked ids only).
api-key viewOne key's metadata.
api-key revokeRevoke a key.

api-key list

List the org's keys: masked ids, names, and created / last-used timestamps.

ax api-key list [--json]

api-key view

Show one key's metadata by id. The secret is never returned.

ax api-key view <KEY_ID> [--json]

api-key revoke

Revoke a key so it stops authenticating immediately.

ax api-key revoke <KEY_ID> [--yes]
Argument / flagWhat it does
<KEY_ID>Required. Key id from ax api-key list.
--yesSkip the confirmation prompt (required when stdin is not a TTY).

Example:

# Rotate: revoke the old key non-interactively, then mint a new one on the
# platform settings page (or with ax auth login)
ax api-key revoke ak_01KSDQ... --yes