keys list
Display all API keys associated with your account.Output
Each key shows its name, ID, masked prefix, mode, creation date, and last used timestamp:Full key values are never displayed after creation. The list only shows the prefix with the rest masked. This is a security measure — keys are hashed with SHA-256 and Argon2 on the server side and cannot be retrieved.
keys create
Create a new API key with an interactive wizard.Options
Interactive Flow
.env File Handling
When you choose to save the key, the CLI writes it to.env in the current directory:
- If the file already contains
ZENDFI_API_KEY(for live keys) orZENDFI_TEST_API_KEY(for test keys), it updates the existing value. - If the file does not exist, it creates one.
- Live keys are stored as
ZENDFI_API_KEY, test keys asZENDFI_TEST_API_KEY.
Non-Interactive Mode
keys rotate
Rotate an existing API key. This generates a new key value and invalidates the old one.Arguments
Example
Security Notes
- Key values are shown once. When you create or rotate a key, the full value is displayed exactly once. After that, only the prefix is available through
keys list. - Test vs. Live isolation. Test keys (
zfi_test_) only work against Devnet. Live keys (zfi_live_) only work against Mainnet. They cannot be used interchangeably. - Rate limits apply. API key operations are rate-limited. See the API Keys reference for rate limit details.
- Scoped keys. Keys can have scoped permissions (read-only, payments-only, etc.). Scoped key management is available through the dashboard or API. The CLI creates full-access keys by default.