Broadcast to Multiple Numbers
POST /api/broadcasts
Send voice messages to multiple phone numbers in a single API call. Perfect for bulk announcements, notifications, or marketing campaigns.
Request Parameters
Section titled “Request Parameters”| Parameter | Type | Required | Description |
|---|---|---|---|
| request_id | string | Yes | Unique request identifier (16-64 chars) to prevent duplicate requests. Use UUID or random string. |
| voice | string | Yes | Name of your approved voice |
| sender | string | Yes | Your active caller sender number |
| phone_numbers | array | Yes | Array of Bangladeshi phone numbers (01XXXXXXXXX format, max 999 numbers) |
Request Example
Section titled “Request Example”curl -X POST https://api.awajdigital.com/api/broadcasts \ -H "Authorization: Bearer your_api_token_here" \ -H "Accept: application/json" \ -H "Content-Type: application/json" \ -d '{ "request_id": "unique_request_id_456", "voice": "your_voice_name", "sender": "8801234567890", "phone_numbers": ["019XXXXXXXX", "018XXXXXXXX", "017XXXXXXXX"] }'// Browser JavaScript (Fetch API)const response = await fetch('https://api.awajdigital.com/api/broadcasts', { method: 'POST', headers: { 'Authorization': 'Bearer your_api_token_here', 'Accept': 'application/json', 'Content-Type': 'application/json' }, body: JSON.stringify({ request_id: 'unique_request_id_456', voice: 'your_voice_name', sender: '8801234567890', phone_numbers: ['019XXXXXXXX', '018XXXXXXXX', '017XXXXXXXX'] })});
const data = await response.json();console.log(data);// Node.js with axiosconst axios = require('axios');
async function sendBroadcast() { try { const response = await axios.post('https://api.awajdigital.com/api/broadcasts', { request_id: 'unique_request_id_456', voice: 'your_voice_name', sender: '8801234567890', phone_numbers: ['019XXXXXXXX', '018XXXXXXXX', '017XXXXXXXX'] }, { headers: { 'Authorization': 'Bearer your_api_token_here', 'Accept': 'application/json', 'Content-Type': 'application/json' } });
console.log(response.data); } catch (error) { console.error('Error:', error.response?.data || error.message); }}
sendBroadcast();# Python with requestsimport requests
def send_broadcast(): url = 'https://api.awajdigital.com/api/broadcasts' headers = { 'Authorization': 'Bearer your_api_token_here', 'Accept': 'application/json', 'Content-Type': 'application/json' } data = { 'request_id': 'unique_request_id_456', 'voice': 'your_voice_name', 'sender': '8801234567890', 'phone_numbers': ['019XXXXXXXX', '018XXXXXXXX', '017XXXXXXXX'] }
try: response = requests.post(url, json=data, headers=headers) print(response.json()) except requests.exceptions.RequestException as e: print(f'Error: {e}')
send_broadcast()<?php// PHP with cURL$url = 'https://api.awajdigital.com/api/broadcasts';$token = 'your_api_token_here';
$data = [ 'request_id' => 'unique_request_id_456', 'voice' => 'your_voice_name', 'sender' => '8801234567890', 'phone_numbers' => ['019XXXXXXXX', '018XXXXXXXX', '017XXXXXXXX']];
$ch = curl_init($url);curl_setopt($ch, CURLOPT_POST, true);curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data));curl_setopt($ch, CURLOPT_HTTPHEADER, [ 'Authorization: Bearer ' . $token, 'Accept: application/json', 'Content-Type: application/json']);curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);curl_close($ch);
$result = json_decode($response, true);print_r($result);?>Success Response Example
Section titled “Success Response Example”{ "success": true, "broadcast": { "id": 123, "name": "api_1_your_voice_3", "status": "broadcasting", "createdAt": "2025-12-29T10:30:00.000Z" }}