List Numbers
GET /api/cc/campaigns/:id/contacts
Each number’s current state, in the order they were added, 100 per page. Use it to find the numbers left to call, or the ones that ran out of attempts.
Requires a Bearer API token (from Authentication / dashboard API Tokens) and the call-center permission.
Rate limit: 60 requests per minute per account, shared by all Campaign API endpoints.
Query Parameters
Section titled “Query Parameters”| Parameter | Type | Required | Description |
|---|---|---|---|
| status | string | No | pending, queued, done, failed or cancelled |
| page | integer | No | Page number, default 1 |
Request Example
Section titled “Request Example”curl -X GET https://api.awajdigital.com/api/cc/campaigns/42/contacts?status=failed&page=1 \ -H "Authorization: Bearer your_api_token_here" \ -H "Accept: application/json"// Browser JavaScript (Fetch API)const response = await fetch('https://api.awajdigital.com/api/cc/campaigns/42/contacts?status=failed&page=1', { 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 listNumbers() { try { const response = await axios.get('https://api.awajdigital.com/api/cc/campaigns/42/contacts?status=failed&page=1', { headers: { 'Authorization': 'Bearer your_api_token_here', 'Accept': 'application/json' } });
console.log(response.data); } catch (error) { console.error('Error:', error.response?.data || error.message); }}
listNumbers();# Python with requestsimport requests
def list_numbers(): url = 'https://api.awajdigital.com/api/cc/campaigns/42/contacts?status=failed&page=1' 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}')
list_numbers()<?php// PHP with cURL$url = 'https://api.awajdigital.com/api/cc/campaigns/42/contacts?status=failed&page=1';$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”{ "meta": { "total": 5, "per_page": 100, "current_page": 1, "last_page": 1 }, "data": [ { "id": 3301, "phone_number": "01812345678", "status": "failed", "attempts": 3, "last_outcome": "not_answered", "next_attempt_at": null, "updated_at": "2026-10-21T10:20:31.000+06:00" } ]}| Field | Type | Description |
|---|---|---|
| id | integer | Number id within the campaign |
| phone_number | string | The number |
| status | string | pending (waiting, or waiting for a retry), queued (being called), done, failed (out of attempts), cancelled (campaign stopped) |
| attempts | integer | Calls made to this number so far |
| last_outcome | string|null | Outcome of the latest call, as in Call Results |
| next_attempt_at | string|null | When a number waiting for a retry will be called again |
| updated_at | string | Last change |
Error Responses
Section titled “Error Responses”| Status | Code | Description |
|---|---|---|
| 401 | — | Missing or invalid access token |
| 403 | — | Account does not have the call-center permission |
| 404 | campaign_not_found |
Unknown campaign, or not on your account |
| 422 | — | Invalid status or page |
| 429 | — | Rate limit exceeded (60 requests/minute) |
