Resume a campaign
POST
https://api.voice-agent.gowajee.ai/api/campaign/:id/resumeSets a paused campaign back to SCHEDULED. The scheduler runs about every 30 seconds. On its first run inside a
calling window, the campaign becomes RUNNING and dials the waiting calls and any retries that are due.
Only a PAUSED campaign can be resumed. On a campaign that is already SCHEDULED or RUNNING, resume does nothing
and still returns 200. A CANCELLED campaign can’t be resumed.
Path parameters
Section titled “Path parameters”| Name | Description |
|---|---|
id |
The campaign ID. |
No request body.
Request
Section titled “Request”curl -X POST "https://api.voice-agent.gowajee.ai/api/campaign/eac2489c-672c-455e-ab8c-4e0ecd18d7dc/resume" \ -H "X-API-Key: $GOWAJEE_API_KEY"const res = await fetch(`https://api.voice-agent.gowajee.ai/api/campaign/${campaignId}/resume`, { method: 'POST', headers: { 'X-API-Key': process.env.GOWAJEE_API_KEY },});res = requests.post( f"https://api.voice-agent.gowajee.ai/api/campaign/{campaign_id}/resume", headers={"X-API-Key": os.environ["GOWAJEE_API_KEY"]}, timeout=30,)Response
Section titled “Response”{ "success": true, "message": "Campaign status updated to SCHEDULED successfully", "data": { "id": "eac2489c-672c-455e-ab8c-4e0ecd18d7dc", "status": "SCHEDULED" }}data.status is the campaign’s status after the request.
{ "success": true, "message": "Campaign is already RUNNING", "data": { "id": "eac2489c-672c-455e-ab8c-4e0ecd18d7dc", "status": "RUNNING" }}Resuming a campaign that is already SCHEDULED or RUNNING succeeds and changes nothing. data.status tells you which one it is.
{ "success": false, "statusCode": 409, "code": "INVALID_CAMPAIGN_STATE", "message": "Cannot resume a CANCELLED campaign", "errors": ["Cannot resume a CANCELLED campaign"]}{ "success": false, "statusCode": 404, "code": "CAMPAIGN_NOT_FOUND", "message": "Campaign not found", "errors": ["Campaign not found"]}Errors
Section titled “Errors”The body is the usual error envelope.
| Status | code |
message |
Cause |
|---|---|---|---|
400 |
INVALID_ID |
id must be a valid UUID |
The id in the path isn’t a UUID. |
404 |
CAMPAIGN_NOT_FOUND |
Campaign not found |
Wrong id, or the campaign belongs to another organization. |
409 |
INVALID_CAMPAIGN_STATE |
Cannot resume a <STATUS> campaign |
Only a PAUSED campaign can be resumed. DRAFT, COMPLETED, CANCELLED and EXPIRED can’t. See State rules. |