API Keys
API keys are the credentials your application uses to authenticate with Tulu Switch. Each key pair consists of a public key and a secret key. Keys are scoped to a single environment (TEST or LIVE) — the environment is encoded in the key prefix so no separate configuration is needed.
Key Format
| Type | Public key prefix | Secret key prefix |
|---|---|---|
| TEST | pk_test_ | sk_test_ |
| LIVE | pk_live_ | sk_live_ |
Environments
The environment is inferred from the key prefix. TEST keys route all operations to the sandbox — using provider test APIs and test wallets with no real money. LIVE keys route to production and process real money.
Managing Keys
API keys are generated and managed entirely from your dashboard — there is no API endpoint for key management. To create or manage your keys:
- Log in to your Tulu Switch dashboard.
- Navigate to Account > Developers in the sidebar.
- Select the environment (TEST or LIVE) and generate a new key pair.
- Copy both the public key and the secret key immediately — the secret key will not be shown again.
From the same page you can also view existing keys (public keys are masked), rotate a key pair, or revoke a key you no longer need.
Secret Key Exposure
The secret key is shown only once — at the moment of generation or rotation. It cannot be recovered after that point.
- Copy and securely store the secret key immediately after generation.
- If you lose your secret key, rotate the pair from the dashboard — the old key is revoked and a new secret is generated.
- The public key is safe to reference but the secret key must never appear in client-side code, logs, or version control.
Limits
- Maximum 5 active key pairs per environment (TEST and LIVE are counted separately).
- Revoke an existing key from the dashboard before generating a new one if you have reached the limit.
LIVE Key Requirements
Generating a LIVE key pair requires your account to have:
- A verified email address
- KYB compliance status of
APPROVED
The dashboard will indicate whether your account meets these requirements. The LIVE key generation option is hidden until all conditions are satisfied.
Best Practices
- Store secret keys in environment variables or a secrets manager — never hard-code them
- Use separate key pairs for different services or deployments so you can revoke a single key without impacting everything
- Rotate keys periodically and immediately whenever a key may have been exposed
- Never commit API keys to version control; use
.envfiles excluded from git - Keep TEST and LIVE key pairs in separate environment configurations to prevent accidental live transactions