Skip to content

Direct Broadcast

POST /api/broadcasts/direct

Send a broadcast without a pre-approved voice by providing CDN audio URLs. Files are downloaded and validated, then played in sequence on each call. Same idea as a direct survey, for announcements.

Parameter Type Required Description
request_id string Yes Unique request identifier (16-64 chars) to prevent duplicate requests. Use UUID or random string.
sender string Yes Your active caller sender number
phone_numbers array Yes Array of Bangladeshi phone numbers (01XXXXXXXXX format, 1-999 numbers). No duplicates allowed.
voices array Yes CDN audio URLs (1-10), played in sequence. A single file is a one-item array.
metadata object No Custom data to associate with the broadcast.

WAV, 8000 Hz, mono, pcm_s16le (G.711-compatible). Every URL is downloaded and validated before the broadcast is queued. Invalid files are rejected with 400.

Terminal window
curl -X POST https://api.awajdigital.com/api/broadcasts/direct \
-H "Authorization: Bearer your_api_token_here" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{
"request_id": "unique_direct_broadcast_123",
"sender": "8801234567890",
"phone_numbers": ["019XXXXXXXX", "018XXXXXXXX"],
"voices": ["https://cdn.example.com/audio/announcement.wav"],
"metadata": { "campaign_id": "direct_broadcast_2026" }
}'
{
"success": true,
"broadcast": {
"id": 123,
"name": "direct_1_1705312800000",
"status": "broadcasting",
"createdAt": "2026-08-31T10:30:00.000Z"
}
}

Poll Get Broadcast Result for per-number call outcomes.

Status Description
400 Duplicate phone numbers, or audio files not in G.711-compatible format
402 Insufficient account balance
403 Extra permission not enabled, or sender not found / not active
409 request_id already used within 15 minutes
422 Invalid request parameters (request_id length, phone format, URL, array size)