API Keys
Manage API keys for programmatic access to Voxvaani’s platform APIs. API keys authenticate requests to WhatsApp messaging, email dispatch, and balance query endpoints.
Overview
Each API key is scoped to specific permissions, allowing you to grant only the access your application needs. Keys can be created, viewed (metadata only), revoked, and deleted from the API Keys management page.
API Key Permissions Reference
| Scope | Description | Key Endpoints |
|---|---|---|
balance:read | Query current resource balances (voice, WhatsApp, email, CRM leads) | GET /api/v1/balance |
whatsapp:send | Send individual WhatsApp messages with text or media | POST /api/v1/whatsapp/send, POST /api/v1/whatsapp/send-media |
whatsapp:send-template | Send individual WhatsApp template messages | POST /api/v1/whatsapp/send-template |
whatsapp:bulk-send | Send WhatsApp template messages to up to 10,000 recipients in a single request | POST /api/v1/whatsapp/bulk-send |
whatsapp:campaigns | Query campaign delivery status, logs, and analytics | GET /api/v1/whatsapp/campaigns/** |
email:send | Send transactional and bulk emails through your configured SMTP | POST /api/v1/email/send |
Choosing the Right Scopes
| Use Case | Recommended Scopes |
|---|---|
| WhatsApp chatbot integration | whatsapp:send |
| Marketing automation (bulk sends) | whatsapp:bulk-send, whatsapp:campaigns |
| Email automation service | email:send |
| Dashboard widget displaying usage | balance:read |
| Full-featured integration platform | All scopes as needed |
| Development/staging environment | Same as production, but on a separate key |
Creating Your First Key
- Navigate to Settings from the sidebar and go to the API Keys section.
- Click Create New Key.
- Enter a descriptive Key Name that identifies its purpose (e.g., “Production WhatsApp Bot” or “Staging Email Integration”).
- Select the scopes the key should have. Start with only what your integration needs.
- Click Create.
- Copy the key immediately — see warning below.
Testing Your New Key
After creating a key, verify it works before integrating it into your application:
CURL:
curl -X GET "https://voxvaani.com/api/v1/balance" \
-H "x-api-key: YOUR_NEW_KEY"Expected response (HTTP 200):
{
"success": true,
"voiceMins": 250,
"whatsappBalance": 1000,
"emailBalance": 1000,
"leadBalance": 100
}If you receive a 401, the key is invalid or was not copied correctly. If you receive a 403, the key lacks the balance:read scope.
Copy your API key immediately — it will never be shown again. The full key value is displayed only once, at the moment of creation. After you navigate away or refresh the page, only the key’s name, creation date, and permissions remain visible. If you lose the key, you must revoke it and create a new one.
Managing Keys
| Action | Description | Reversible |
|---|---|---|
| View | See key name, creation date, last used, and permissions. The full key value is hidden. | N/A |
| Revoke | Immediately disables a key. All API requests using this key return 401. | Yes — you can re-enable a revoked key |
| Delete | Permanently removes the key and all its metadata. Cannot be undone. | No — deletion is irreversible |
Revoking a key is immediate and affects all applications using it. Before revoking, make sure you have distributed a replacement key to any dependent services. Plan key rotations during maintenance windows to avoid service disruptions.
Key Rotation Checklist
Follow these steps to rotate a key without downtime:
- Create a replacement key with identical scopes.
- Deploy the new key to your application — update environment variables, secrets manager, or configuration files.
- Verify the new key works — make a test API call and confirm a 200 response.
- Revoke the old key from the API Keys settings page.
- Confirm revocation — verify the old key now returns 401.
Rotate keys every 90 days for production environments. Rotate immediately if a key is suspected to be compromised, or if a team member with access to the key leaves the organization.
Environment Strategy
Use separate API keys for each stage of your development lifecycle:
| Environment | Key Name Convention | Purpose |
|---|---|---|
| Production | vv_live_<service> | Live customer-facing integrations. Minimal scopes, rotated every 90 days. |
| Staging | vv_staging_<service> | Pre-release testing with production-like data. Same scopes as production. |
| Development | vv_dev_<service> | Local development and CI/CD pipelines. May use broader scopes for debugging. |
This separation ensures:
- A bug in development code cannot affect production data.
- Staging can be tested with production-equivalent permissions without risking live balances.
- Compromised development keys have zero impact on production systems.
Webhook Endpoint Management
Voxvaani supports webhook endpoints for receiving real-time event notifications:
| Webhook Event | Trigger | Payload Includes |
|---|---|---|
| WhatsApp Message Received | Incoming WhatsApp message | Message content, sender, timestamp |
| WhatsApp Status Update | Message delivery/failure/read status | Message ID, status, timestamp |
| Email Delivery Status | Email delivered/bounced/complained | Email ID, status, recipient |
To configure webhooks:
- Navigate to Settings from the sidebar and go to the API Keys section.
- Click the Webhooks tab.
- Enter your endpoint URL (must be HTTPS).
- Set a verification token — this token is used to validate that incoming webhook requests originate from Voxvaani.
- Select which events you want to receive.
- Click Save.
Security Best Practices
| Practice | Detail |
|---|---|
| Never expose keys in client-side code | API keys embedded in frontend JavaScript, mobile apps, or public repositories can be extracted by anyone. Always use server-side code to make API requests. |
| Use environment variables | Store keys in .env files or your hosting platform’s secret manager. Never commit .env files to version control. |
| Rotate keys periodically | Create a new key every 90 days, update your applications, and revoke the old key. |
| Principle of least privilege | Assign only the permissions an application actually needs. A WhatsApp bot does not need Email access. |
| Revoke unused keys | If an application or integration is decommissioned, immediately revoke its API key. |
| Separate dev and production keys | Use distinct keys for development, staging, and production environments. |