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.
| Command | Use |
|---|---|
api-key list | List keys (masked ids only). |
api-key view | One key's metadata. |
api-key revoke | Revoke 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 / flag | What it does |
|---|---|
<KEY_ID> | Required. Key id from ax api-key list. |
--yes | Skip 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