Skip to main content

API Base URL

All API endpoints are relative to the following base URL:
https://sa.dialgen.ai

Authentication

All API requests must be authenticated using a Bearer Token. Pass your API key in the Authorization header:
Authorization: Bearer <YOUR_API_KEY>
You can obtain your API key from the Dialgen API Keys dashboard.
Important Note on userIdAll endpoints should pass in the userId in the request body or query parameters. You can find your userId in the sa.dialgen.ai dashboard.

Response Formats

The API uses standard HTTP status codes to indicate the success or failure of a request. All response bodies are returned in JSON format.
Status CodeDescription
200 OKRequest succeeded
202 AcceptedRequest accepted for processing (used for batches)
400 Bad RequestMissing or invalid fields/parameters
401 UnauthorizedMissing or invalid API key
402 Payment RequiredInsufficient call minutes/credits
404 Not FoundThe requested resource was not found
409 ConflictA call is already in progress for this contact
500 Internal Server ErrorAn unexpected server error occurred

Best Practices

Rate Limiting & Throttling

  • Default Rate: 10 calls per second (adjustable via maxCallsPerSecond in batch options).
  • Recommendation: Start with lower rates (5-10 CPS) and scale up based on your telephony provider’s limits.

Webhooks

For a fully automated workflow, you can provide a webhook URL when creating a batch or initiating a call.
  • Idempotency: Your webhook endpoints should handle duplicate calls gracefully.
  • Authentication: Secure your webhook endpoints with authentication tokens.
  • Timeout: Respond to webhook calls within 5 seconds to avoid retries.
  • Retry Logic: We retry failed webhook calls up to 3 times with exponential backoff.