Start, Pause, Stop
POST /api/cc/campaigns/:id/start
POST /api/cc/campaigns/:id/pause
POST /api/cc/campaigns/:id/stop
No request body. Each returns the campaign with its new status.
| Action | Allowed from | Effect |
|---|---|---|
| start | draft, paused |
Starts calling. A paused campaign continues where it stopped. Needs at least one number not called yet. |
| pause | running |
No new calls; calls in progress finish. |
| stop | draft, running, paused |
Final. No new calls or numbers; calls in progress finish, numbers not called yet become cancelled. |
Only one campaign can run on a group at a time: starting a second one returns 409 queue_busy.
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.
Request Example
Section titled “Request Example”curl -X POST https://api.awajdigital.com/api/cc/campaigns/42/start \ -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/start', { method: 'POST', 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 startCampaign() { try { const response = await axios.post('https://api.awajdigital.com/api/cc/campaigns/42/start', null, { headers: { 'Authorization': 'Bearer your_api_token_here', 'Accept': 'application/json' } });
console.log(response.data); } catch (error) { console.error('Error:', error.response?.data || error.message); }}
startCampaign();# Python with requestsimport requests
def start_campaign(): url = 'https://api.awajdigital.com/api/cc/campaigns/42/start' headers = { 'Authorization': 'Bearer your_api_token_here', 'Accept': 'application/json' }
try: response = requests.post(url, headers=headers) print(response.json()) except requests.exceptions.RequestException as e: print(f'Error: {e}')
start_campaign()<?php// PHP with cURL$url = 'https://api.awajdigital.com/api/cc/campaigns/42/start';$token = 'your_api_token_here';
$ch = curl_init($url);curl_setopt($ch, CURLOPT_POST, 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);?>Use /pause or /stop in place of /start for the other actions.
Success Response Example
Section titled “Success Response Example”{ "data": { "id": 42, "name": "October renewals", "status": "running", "group_id": 7, "group_name": "Sales", "contact_count": 2, "customer_ring_seconds": 30, "max_customer_wait_seconds": 20, "started_at": "2026-10-21T10:05:00.000+06:00", "stopped_at": null, "created_at": "2026-10-21T10:00:00.000+06:00" }}The fields are described in Create Campaign.
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 |
| 409 | invalid_status |
The action is not allowed in the campaign’s status |
| 409 | no_contacts |
Start: no number left to call |
| 409 | queue_busy |
Start: another campaign is running on this group |
| 409 | sender_has_no_trunk |
Start: the group’s number cannot place calls; contact support |
| 409 | campaign_stopped · campaign_completed |
The campaign is already final |
| 429 | — | Rate limit exceeded (60 requests/minute) |
| 503 | engine_unreachable |
The call engine could not be reached; nothing changed |
