List Senders
GET /api/senders
Retrieve a list of all caller sender numbers associated with the authenticated user’s account along with their status.
Request Example
Section titled “Request Example”curl -X GET https://api.awajdigital.com/api/senders \ -H "Authorization: Bearer your_api_token_here" \ -H "Accept: application/json"// Browser JavaScript (Fetch API)const response = await fetch('https://api.awajdigital.com/api/senders', { 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 getSenders() { try { const response = await axios.get('https://api.awajdigital.com/api/senders', { headers: { 'Authorization': 'Bearer your_api_token_here', 'Accept': 'application/json' } });
console.log(response.data); } catch (error) { console.error('Error:', error.response?.data || error.message); }}
getSenders();# Python with requestsimport requests
def get_senders(): url = 'https://api.awajdigital.com/api/senders' 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_senders()<?php// PHP with cURL$url = 'https://api.awajdigital.com/api/senders';$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, "senders": [ { "id": 1, "callingNumber": "8801234567890", "status": "active" }, { "id": 2, "callingNumber": "8809876543210", "status": "active" }, { "id": 3, "callingNumber": "8805555555555", "status": "inactive" } ]}