The CLI uses one HEVN API key for authenticated app and transfer endpoints, plus a public mode for unauthenticated reads.
HEVN API key mode
Authenticated endpoints build headers from HEVN_API_KEY or saved login config.
Default header:
Set it manually:
Use browser login:
or direct API-key login for automation:
hevn login stores the API key, header mode, and optional base URL in the local CLI config.
Alternate X-Api-Key mode
Some deployments require X-Api-Key instead of Authorization:
The CLI reuses whichever header was configured for all authenticated endpoints, including transfers.
Non-interactive auth
In CI and other non-interactive environments, avoid browser login and pass a key directly:
If interactive login is attempted in non-interactive mode, the CLI exits with AUTH_REQUIRED and reports the supported auth methods.
Idempotency
Transfer and deposit writes can include:
CLI example:
API-key introspection
Use whoami to inspect the active API key, owning app, scopes, balance, and remaining spend limit:
Public mode
PublicApi sends only:
It is used for FX rates and public invoice lookup.
Debug output may include authentication headers. Redact debug logs before sharing them.