Get Broadcast Result
GET /api/broadcasts/:id/result
Retrieve the result of a broadcast. If the broadcast is still in progress, only status information is returned. If the broadcast is complete, detailed results for each phone number are included.
Path Parameters
Section titled “Path Parameters”| Parameter | Type | Required | Description |
|---|---|---|---|
| id | integer | Yes | The broadcast ID returned from broadcast creation |
Request Example
Section titled “Request Example”curl -X GET https://api.awajdigital.com/api/broadcasts/123/result \ -H "Authorization: Bearer your_api_token_here" \ -H "Accept: application/json"// Browser JavaScript (Fetch API)const broadcastId = 123;const response = await fetch(`https://api.awajdigital.com/api/broadcasts/${broadcastId}/result`, { method: 'GET', headers: { 'Authorization': 'Bearer your_api_token_here', 'Accept': 'application/json' }});
const data = await response.json();console.log(data);// Node.js with axiosconst axios = require('axios');
async function getBroadcastResult(broadcastId) { try { const response = await axios.get( `https://api.awajdigital.com/api/broadcasts/${broadcastId}/result`, { headers: { 'Authorization': 'Bearer your_api_token_here', 'Accept': 'application/json' } } );
console.log(response.data); } catch (error) { console.error('Error:', error.response?.data || error.message); }}
getBroadcastResult(123);# Python with requestsimport requests
def get_broadcast_result(broadcast_id): url = f'https://api.awajdigital.com/api/broadcasts/{broadcast_id}/result' headers = { 'Authorization': 'Bearer your_api_token_here', 'Accept': 'application/json' }
try: response = requests.get(url, headers=headers) print(response.json()) except requests.exceptions.RequestException as e: print(f'Error: {e}')
get_broadcast_result(123)<?php// PHP with cURL$broadcastId = 123;$url = "https://api.awajdigital.com/api/broadcasts/{$broadcastId}/result";$token = 'your_api_token_here';
$ch = curl_init($url);curl_setopt($ch, CURLOPT_HTTPGET, true);curl_setopt($ch, CURLOPT_HTTPHEADER, [ 'Authorization: Bearer ' . $token, 'Accept: application/json']);curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);curl_close($ch);
$result = json_decode($response, true);print_r($result);?>Running Broadcast Response
Section titled “Running Broadcast Response”{ "success": true, "broadcast": { "id": 123, "name": "api_1_voice_3", "status": "broadcasting", "listenerCount": 3, "completeCount": 1, "createdAt": "2025-12-30T10:00:00.000Z" }, "isComplete": false, "message": "Broadcast is still in progress"}Completed Broadcast Response
Section titled “Completed Broadcast Response”{ "success": true, "broadcast": { "id": 123, "name": "api_1_voice_3", "status": "completed", "listenerCount": 3, "completeCount": 3, "createdAt": "2025-12-30T10:00:00.000Z" }, "isComplete": true, "statusDistribution": { "pending": 0, "answered": 2, "notAnswered": 1, "rejected": 0, "busy": 0, "failed": 0, "unknown": 0 }, "results": [ { "phoneNumber": "019XXXXXXXX", "status": "answered", "duration": 45 }, { "phoneNumber": "018XXXXXXXX", "status": "not_answered", "duration": null }, { "phoneNumber": "017XXXXXXXX", "status": "answered", "duration": 30 } ]}