Authorization header.
How API Keys Work
Include your API key as a Bearer token in theAuthorization header of every API request:
dnx_live_- live keys that affect real calls and billingdnx_test_- test keys for development (calls are simulated, no telephony is initiated, no billing occurs)
Creating an API Key
Open API Keys settings
Go to Settings → API Keys in the dashboard. You’ll see a list of all existing keys.
Name the key
Give the key a descriptive name that identifies the service using it (e.g., “Production CRM Integration”, “Batch Campaign Service”, “Staging Test Key”). Names are for your reference only and do not affect key behavior.
Select key type
Choose Live or Test. Test keys behave identically to live keys in terms of API responses, but do not initiate real calls or incur charges.
After creation, only the last 4 characters of the key are visible in the dashboard (e.g.,
dnx_live_...xxxx). This is intentional - it lets you identify keys without exposing them.Key Permissions
By default, a new API key has full access to all resources within the workspace it belongs to. If you want more granular control, you can restrict a key’s permissions when creating it:| Permission | What it allows |
|---|---|
calls:read | Read call history, transcripts, recordings |
calls:write | Initiate outbound calls, manage campaigns |
agents:read | Read agent configurations |
agents:write | Create, update, delete agents |
phone_numbers:read | List phone numbers |
phone_numbers:write | Purchase, configure, release phone numbers |
analytics:read | Read usage metrics and reports |
billing:read | View wallet balance and invoices |
calls:read only, not calls:write or agents:write.
Rotating API Keys
Key rotation replaces an existing key with a new one, invalidating the old one. Rotate keys:- Every 90 days as a standard security practice
- Immediately after any team member departure (if they had access to the key)
- Immediately after a suspected or confirmed key exposure
Create a new key
Follow the key creation steps above to generate a replacement key with the same permissions as the key being rotated.
Update your application
Replace the old key with the new key in your application’s environment variables or secrets manager. Deploy the updated configuration.
Verify the new key is working
Confirm that your application is successfully authenticating with the new key by checking API call logs or the key’s last-used timestamp in the dashboard.
Revoking an API Key
To revoke a key:- Go to Settings → API Keys
- Find the key you want to revoke
- Click the Revoke button (trash icon) on that key’s row
- Confirm the revocation
401 Unauthorized errors on all subsequent requests. There is no grace period.
Monitoring API Key Usage
The API Keys dashboard shows usage statistics for each key:- Last used: timestamp of the most recent authenticated request
- Total requests (30 days): request count over the last 30 days
- Last IP: the IP address from which the last request was made
Security Best Practices
| Practice | Why it matters |
|---|---|
| Store keys in environment variables or a secrets manager | Prevents accidental exposure in source code or logs |
| Never commit keys to version control | Repositories (even private ones) can be leaked or scraped |
| Never log API keys | Log files are often less protected than application secrets |
| Never embed keys in client-side code | Browser JavaScript is visible to anyone - keys will be extracted |
| Use separate keys per service | Limits blast radius if one key is compromised |
| Use test keys for development | Prevents accidental real calls or charges during testing |
| Rotate keys every 90 days | Limits the window of exposure if a key was silently compromised |
| Revoke unused keys | Every active key is an unnecessary attack surface |
Workspace Scope
API keys belong to a specific workspace. A key from Workspace A cannot access agents, calls, or phone numbers in Workspace B. If you operate multiple workspaces (e.g., for different clients or environments), create separate API keys for each workspace. Organization-level API keys (available on Enterprise plans) have cross-workspace access. See Organization and Members for details.Related Pages
- Prevent Abuse - hardening your deployment security
- Workspace - workspace management and scope
- API Reference - full API documentation