Get Direct TTS Broadcast Status
GET /api/broadcasts/direct-tts/{requestId}/status
Check the processing status of a Direct TTS Broadcast request. Only requests owned by your account can be queried.
Request Parameters
Section titled “Request Parameters”| Parameter | Type | Required | Description |
|---|---|---|---|
| requestId | string | Yes | The request_id returned when the direct TTS broadcast was accepted. |
Request Example
Section titled “Request Example”curl -X GET https://api.awajdigital.com/api/broadcasts/direct-tts/unique_direct_tts_001/status \ -H "Authorization: Bearer your_api_token_here" \ -H "Accept: application/json"// Browser JavaScript (Fetch API)const response = await fetch('https://api.awajdigital.com/api/broadcasts/direct-tts/unique_direct_tts_001/status', { 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 getDirectTtsStatus() { try { const response = await axios.get('https://api.awajdigital.com/api/broadcasts/direct-tts/unique_direct_tts_001/status', { headers: { 'Authorization': 'Bearer your_api_token_here', 'Accept': 'application/json' } });
console.log(response.data); } catch (error) { console.error('Error:', error.response?.data || error.message); }}
getDirectTtsStatus();# Python with requestsimport requests
def get_direct_tts_status(): url = 'https://api.awajdigital.com/api/broadcasts/direct-tts/unique_direct_tts_001/status' 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_direct_tts_status()<?php// PHP with cURL$url = 'https://api.awajdigital.com/api/broadcasts/direct-tts/unique_direct_tts_001/status';$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);?>Success Response Example
Section titled “Success Response Example”{ "success": true, "status": "completed", "broadcast_id": 123}A failed request includes the processing error:
{ "success": true, "status": "failed", "error": "TTS provider request failed"}| status | Meaning |
|---|---|
| pending | Request accepted, waiting to be processed |
| processing | Audio is being generated |
| completed | Broadcast created and calls queued — broadcast_id is included (may be null) |
| failed | Processing failed — an error message is included |
Error Responses
Section titled “Error Responses”| Status | Description |
|---|---|
| 401 | Missing or invalid access token |
| 404 | Request not found or not owned by your account |
