The three key kinds
mfx_test_... - sandbox environment key
Operational key scoped to a single sandbox environment. Sends sandbox faxes (no carrier dispatch). Reads that environment’s sandbox fax history, events, webhooks, and credit balance. Cannot touch live data and cannot call /account/*.
mfx_live_... - live environment key
Operational key scoped to a single live environment. Sends real faxes through the carrier. Reads that environment’s live data. Requires the account to be activated - until the first live credit purchase succeeds, a live key returns account_not_activated on operational routes.
mfx_acct_... - account management key
Account-scoped admin key. Reads and manages account-level resources: balances across all pools, the pool-wide transaction ledger, and the list of API keys. Cannot send faxes and cannot call /environment/*. Think of it as the keys-and-money key, not the send-a-fax key.
The prefix is the sandbox/live wall
mintfax follows Stripe’ssk_test_ / sk_live_ pattern, with a third acct kind for the account namespace. Because the gateway routes on prefix, the wall between sandbox and live is structural, not configurational:
A key never spans sandbox and live. Each environment is one type for its life. To send live, use a live key against a live environment. To send sandbox, use a sandbox key against a sandbox environment. There is no environment toggle in the API.
Registration provisions two keys
POST /account/register/verify returns both a mfx_test_... key and a mfx_acct_... key in the same response. Store both. They have different jobs:
- Use the sandbox key for your first sandbox fax in dev. It is scoped to the sandbox environment created at registration.
- Use the acct key when you need to programmatically manage environments, balances, or other keys. For example: listing all your API keys, reading the live and sandbox balances side by side, or creating a new live environment key after you activate.
.env file before navigating away.
Creating more keys
Environment keys (test or live)
POST /account/keys with scope_kind=test or scope_kind=live creates an environment-scoped key. Use an mfx_acct_... key to authenticate the call:
Account keys
Subsequentmfx_acct_... keys cannot be created via the API. POST /account/keys with scope_kind=account returns HTTP 403 with acct_key_creation_dashboard_only:
Revocation
Deleting an environment key via the API:
api_key_invalid.
Which key for which endpoint
The API splits cleanly into two scopes:- Operational (
/faxes,/environment/*,/webhooks,/events) - environment keys only. - Account (
/account/*) - account keys only.
When a key hits a route it is not scoped for, the API returns HTTP 403 with a specific code:
- Environment key on an account route:
key_not_scoped_for_account. - Account key on an operational route:
key_not_scoped_for_operations.
Worked example: agent registration flow
A coding agent registers, stores both keys, sends a sandbox fax, then later switches to live.Related pages
- Environments - sandbox vs live environments
- Credits - account-pool credit model and balances
- Activation - what enables live operations
- Errors - full error code catalog