REST Architecture
Standardized HTTP methods for configuration, phone number provisioning, and campaign management.
Skip the telecom complexity. Deploy, manage, and scale intelligent phone bots through a single REST and WebSocket interface - with absolute control over routing, logic, and data extraction.
< 500ms
Round-trip audio latency
10,000+
Concurrent channels
60+
Local number markets
100+
Languages supported
Quick Answer
The OnDial AI Voice Agent API is a developer-focused REST and WebSocket interface for programming inbound and outbound conversational bots. It handles telecom routing, speech-to-text, natural language processing, and text-to-speech rendering, allowing engineering teams to automate enterprise phone calls and synchronize extracted data directly into custom backends.
API Overview
Fits cleanly into CI/CD pipelines and microservices - from number provisioning to real-time audio streaming.
Why Choose OnDial API
Compare our infrastructure to traditional telecom providers or basic wrapper tools - the engineering advantages are clear.
API Features
Quick Start
Register your developer profile in the OnDial dashboard.
Open the Developers tab and generate a production secret. Copy it immediately - it is shown once.
Include Authorization: Bearer <YOUR_API_KEY> on every request.
POST to /v1/calls/outbound with a destination number and agent prompt in the JSON body.
The server returns 201 Created with a unique call_id for the session.
Expose a local server, register the URL in webhook settings, and stream live call events.
Authentication and Security
All interactions with OnDial infrastructure require strict authentication.
Standard secret keys for server-to-server authorization. Never embed them in client-side apps or public repositories.
Format headers exactly as Authorization: Bearer sk_live_…
Every POST, PUT, and PATCH request must include Content-Type: application/json.
Reserved for partners building marketplace apps. Standard enterprise implementations should use API keys.
Production
https://api.ondial.ai/v1Standard billing rates
Sandbox
https://sandbox.ondial.ai/v1Free testing; audio is watermarked
URI path versioning is active on v1. Breaking changes follow a 12-month deprecation cycle with engineering contact notices.
API Endpoints
/v1/agents
Compile system prompt, voice characteristics, and behavioral rules into a reusable agent ID.
/v1/calls/config
Draft a session without dialing - useful for pre-loading variables before outbound campaigns.
/v1/numbers/{number_id}
Bind a purchased number to a specific agent instead of a generic holding queue.
/v1/calls/outbound
Dial a destination in E.164 format and attach an agent when the call is answered.
/v1/calls/{call_id}/transfer
Bridge the current session to a target SIP URI or phone number.
/v1/calls/{call_id}/hangup
Terminate the session immediately and trigger the final summary webhook.
/v1/analytics/agents/{agent_id}
Pull historical minutes, average duration, and error rates for a time range.
/v1/webhooks
Add a destination URL and subscribe to the events your system needs.
/v1/calls/{call_id}/voice
Alter speaking rate or pitch dynamically during an active call.
/v1/calls/{call_id}/language
Disable auto-detect and force a specific locale such as fr-CA.
/v1/calls/{call_id}/sync
Bypass normal delay and immediately POST call data to your CRM integration.
/v1/integrations/calendar/book
Inject extracted scheduling data into connected Google or Outlook accounts.
/v1/calls/{call_id}/qualification
Return a boolean array of which required questions the caller answered positively.
/v1/notifications
Send SMS or email alerts to admins based on call events.
/v1/calls/{call_id}/summary
Return the transcript array and an LLM-generated executive summary.
SDKs
Skip raw HTTP when you can. Use an official OnDial SDK for your preferred language.
pip package
pip install ondial-python-sdknpm package
npm install @ondial/clientMaven package
com.ondial.api (Maven Central)Composer package
composer require ondial/php-sdkgo get package
go get github.com/ondial/ondial-goNuGet package
NuGet: OnDial client packageCode Examples
curl -X POST https://api.ondial.ai/v1/calls/outbound \
-H "Authorization: Bearer YOUR_SECRET_KEY" \
-H "Content-Type: application/json" \
-d '{"to_number": "+1234567890", "agent_id": "ag_123xyz"}'Webhooks
Webhooks push state changes to your systems as the conversation unfolds.
Critical events include call.ringing, call.answered, speech.user_started, speech.agent_responded, and call.completed.
On 4xx or 5xx responses, delivery retries up to 5 times with exponential backoff across 24 hours.
Every payload includes X-OnDial-Signature. Verify with HMAC SHA256 of the raw body using your webhook secret.
Voice Workflow Architecture
User speaks into their phone.
Audio packets travel through the SIP trunk to the OnDial ingress node.
STT engine transcribes raw audio bytes into text.
Text is processed by the designated LLM using your agent system prompt.
LLM streams tokens to the TTS engine.
Synthesized audio is pushed back through the telecom trunk.
Background webhook logs the interaction and syncs data to your CRM.
Integrations
Security Protocol
Performance Metrics
P99 latency so bots don't talk over users
Availability SLA with financially backed credits
Concurrent sessions per enterprise tenant
Media nodes across US, EU, and AP regions
Industry Use Cases
API Comparison
| Feature | OnDial API | ElevenLabs | Bland AI | Vapi | Retell AI | Deepgram |
|---|---|---|---|---|---|---|
| Core Architecture | Enterprise Voice Agent API | TTS Generation | General Calling | Voice UI | Conversational AI | STT / Audio |
| HIPAA / BAA Support | Yes (Standard) | Varies | Yes | Varies | Yes | Yes |
| WebSocket Latency | < 500ms | N/A | ~600ms | ~500ms | ~500ms | N/A |
| Direct DB/CRM Mapping | Yes (Native) | No | Limited | No | Limited | No |
| SIP Bridge Routing | Yes (Full Control) | No | Yes | Yes | Yes | No |
| Bring Your Own LLM | Yes | No | No | Yes | Yes | No |
Developer FAQ
Common questions from teams integrating the OnDial Voice Agent API.
Yes. You can point purchased numbers to your webhooks for inbound handling, and use the /v1/calls/outbound endpoint to generate calls programmatically.
Ready to Build
Stop spending engineering hours on telecom plumbing. Generate sandbox keys and initiate your first programmatic call in minutes.