Authentication

All API requests require authentication using an API key.

API Keys

API keys are used to authenticate your requests. You can create and manage your API keys in your account settings under Settings → API Keys.

Keep your API keys secure
Never share your API keys or commit them to version control. Use environment variables to store them securely.

Using your API key

Include your API key in the x-api-key header:

x-api-key: YOUR_API_KEY

Here's an example using cURL:

curl -X GET "https://vocalis.io/api/v1/contact-lists" \
-H "x-api-key: YOUR_API_KEY"

Key Format

API keys use the following format:

dk_followed by a unique identifier (e.g., dk_abc123xyz...)

Organizations and Scopes

A key belongs to one organization — the one you were working in when you created it. It reads and writes only that organization's data, even if your own account belongs to several. A request for a resource in another organization returns 404, the same answer as a resource that does not exist.

By default a key can do everything you can do in that organization. Narrow it by listing capabilities when you create it, and it can do only those — useful for a key that lives in a script, a partner integration, or anywhere the blast radius matters more than convenience.

{
"name": "Reporting export",
"scopes": ["call:read", "campaign:read"]
}

Scopes are capability names in resource:action form. Each endpoint's reference page names the capability it requires. A request outside a key's scopes is refused with 403 INSUFFICIENT_SCOPE, and the refusal names the capability that was missing.

Reading a call and listening to its recording are separate capabilities. A transcript redacts what the audio does not, so call:read does not include call:listen.

Rate Limits

Each API key has rate limits to ensure fair usage:

  • 60 requests per minute (RPM)
  • 10,000 requests per day (RPD)
Rate limits are applied per API key. Contact support if you need higher limits for your use case.

Authentication Errors

If authentication fails, you'll receive one of these error responses:

401INVALID_API_KEY

The provided API key is invalid or missing

401EXPIRED_API_KEY

The API key has been revoked or expired

429RATE_LIMIT_EXCEEDED

You've exceeded your rate limit