chainabit auth keys create
Create a new API key, confirming your identity when required.
Synopsis
chainabit auth keys create <name> [options]Arguments
| Argument | Description | Default |
|---|---|---|
<name> | Required. | — |
Options
| Option | Description | Default |
|---|---|---|
--expires <preset> | Expiry preset; auth keys scopes shows which ones this account can use. Accepted values: none, 1d, 7d, 30d, 90d, 1y. Conflicts with: ttl. | — |
--expires-at <date> | Expire at a chosen time: an ISO-8601 instant with Z or a UTC offset (2026-12-31T18:00:00+03:00), or YYYY-MM-DD for the end of that day in UTC (23:59:59.999Z, so a date alone can be at most 364 days ahead); auth keys scopes shows the allowed range. Conflicts with: expires, ttl. | — |
--ttl <days> | Legacy expiry in days (1–365, default 30); prefer --expires or --expires-at | "30" |
--scope <scope...> | Grant explicit scopes (repeat or pass a comma-separated list; see auth keys scopes) | — |
--allow-ip <cidr...> | Limit the key to these IP addresses or CIDR ranges (repeat or comma-separate) | — |
--account <accountId> | Bind the API key to a specific account | — |
--verify <method> | Identity verification method. Accepted values: password, passkey, email, google, github, microsoft, apple. | — |
--password-env <name> | Read the verification password from an environment variable | — |
--password-file <path> | Read the verification password from a file | — |
--password-stdin | Read the verification password from piped stdin | — |
--totp-env <name> | Read an MFA authenticator code from an environment variable | — |
Options shared by every command are described in Global options and shared behavior.
Alias of: chainabit auth developer-token create.
Behavior
Creates a labelled API key with a finite expiry and optional explicit scopes/account binding. The complete key is returned only at creation; later listings show a preview.
Validation
--ttl is converted with parseInt and must be between 1 and 365 days; use a plain integer. --scope can contain repeated values or comma-separated entries. Account binding uses --account. Omitted scope uses the server default; it does not grant unrestricted authority. Credential creation can require a recent security step-up in the app.
Output
Human output shows the one-time token, preview, scopes and expiry. --json prints the full creation response including the secret. Step-up/authentication/validation refusals are CLI failures; a displayed preview is not the full key.
Safety and billing
This command exposes a complete credential. Keep terminal output, logs and redirected files private; never paste them into reports or commit them. Creating a new key is a new credential operation, not an idempotent replay.
Examples
chainabit auth keys create "Reference automation" --ttl 1 --scope execution:run