List Voices
GET /api/voices
Retrieve a list of all voices created by the authenticated user along with their approval status.
Request Example
Section titled “Request Example”curl -X GET https://api.awajdigital.com/api/voices \ -H "Authorization: Bearer your_api_token_here" \ -H "Accept: application/json"// Browser JavaScript (Fetch API)const response = await fetch('https://api.awajdigital.com/api/voices', { 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 getVoices() { try { const response = await axios.get('https://api.awajdigital.com/api/voices', { headers: { 'Authorization': 'Bearer your_api_token_here', 'Accept': 'application/json' } });
console.log(response.data); } catch (error) { console.error('Error:', error.response?.data || error.message); }}
getVoices();# Python with requestsimport requests
def get_voices(): url = 'https://api.awajdigital.com/api/voices' 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_voices()<?php// PHP with cURL$url = 'https://api.awajdigital.com/api/voices';$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, "voices": [ { "id": 1, "name": "welcome_message", "status": "approved", "createdAt": "2025-12-01T10:00:00.000Z" }, { "id": 2, "name": "otp_voice", "status": "pending", "createdAt": "2025-12-15T14:30:00.000Z" }, { "id": 3, "name": "promo_announcement", "status": "rejected", "createdAt": "2025-12-20T09:15:00.000Z" } ]}