API keys
All requests to the DialNexa API must be authenticated using an API key. You can create and manage API keys in the DialNexa dashboard under Settings > API Keys, or programmatically via the API Keys endpoints. An API key has two parts separated by a colon:Bearer token
Pass your API key as a Bearer token in theAuthorization header on every request:
Example
401 Unauthorized:
Creating an API key
secret field. This value is only returned once, copy it immediately and store it securely. You cannot retrieve the secret after this initial response.
Key management best practices
- One key per environment: Create separate keys for development, staging, and production. This makes it easy to rotate a key in one environment without affecting others.
- Rotate regularly: Revoke and replace keys on a schedule, or immediately if you suspect a key has been compromised.
- Least privilege: If you are building a read-only integration (for example, fetching call logs to display in a dashboard), use a dedicated key for that integration. Revoke it independently if needed.
Revoking a key
401 Unauthorized.
Webhook signature verification
Incoming webhook payloads from DialNexa are signed with HMAC-SHA256 using the secret you provided when registering the webhook. Verify theX-DialNexa-Signature header on every incoming request to confirm the payload originated from DialNexa.
hmac.compare_digest in Python or crypto.timingSafeEqual in Node.js) to prevent timing attacks.