Authenticate with the do.dev API using API keys
All API requests to do.dev require authentication via an API key.
Generate API keys from the do.dev dashboard. Each key is scoped to specific services and permissions.
Include your API key in requests using either method:
Authorization header (recommended):
Authorization: Bearer sk_live_your_api_key_hereX-API-Key header:
X-API-Key: sk_live_your_api_key_hereAPI keys are scoped to control access. Common scopes include:
| Scope | Description |
|---|---|
telco:read | Read access to Telco API (lookup, search, carriers) |
send:write | Send emails, manage templates and domains |
send:read | Read email status, list templates and domains |
talk:write | Generate speech audio |
talk:read | List voices and formats |
platform:webhooks:read | View webhook endpoints and events |
platform:webhooks:manage | Create, update, and delete webhook endpoints |
platform:events:read | Query the event log |
| Prefix | Environment |
|---|---|
sk_live_ | Production keys |
sk_test_ | Test/sandbox keys |
If authentication fails, you'll receive a 401 Unauthorized response:
{
"error": "unauthorized",
"message": "Invalid or missing API key"
}If your key lacks the required scope, you'll receive a 403 Forbidden response:
{
"error": "forbidden",
"message": "Insufficient scope. Required: telco:read"
}