Voice Calls API

The Voice API allows you to initiate outbound calls, play audio files, and manage call flows programmatically.

Initiate a Call

POST/calls

Initiates a new outbound voice call to a single recipient.

Parameters

ParameterTypeRequiredDescription
tostringYesThe phone number to call (E.164 format).
audio_urlstringYesURL of the audio file to play.
callback_urlstringNoWebhook URL for call status updates.

Example Request

bash
curl -X POST https://api.devsecit.com/v1/calls \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "to": "+919876543210",
    "audio_url": "https://example.com/welcome.mp3",
    "callback_url": "https://myapp.com/webhooks/voice"
  }'

Example Response

json
{
  "id": "ca_123456789",
  "status": "queued",
  "created_at": "2023-10-27T10:00:00Z"
}