Resume a Campaign
POST /v1/campaigns/{campaign_id}/resume
| Property | Value |
|---|---|
| Operation | resume_campaign |
| Group | Campaigns |
| Scope | campaigns:write |
| Route class | control |
| Idempotency | Idempotency-Key accepted: a retry with the same key replays the first answer |
| Audit | Audited campaigns.campaign.resume (mutation) |
| Released in | 1.65.0 |
| Phase 0 host | Served (the hosted api pins 1.65.0) |
Resumes a paused Campaign once it re-validates (1.65.0; section 3.8): arms published and allowed, numbers capable, the attestation in force, the budget not reached, each failure an issue of 422 validation_failed. A running one is answered as it stands; another status is campaign_conflict (not_paused).
Request
Set VOCAL_API to the base URL of your API and VOCAL_API_KEY to an API key with the campaigns:write scope (Authentication and keys). Replace each placeholder, such as agt_... or <name>, with your own value.
curl -X POST "$VOCAL_API/v1/campaigns/cmp_.../resume" \
-H "Authorization: Bearer $VOCAL_API_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{}'const response = await fetch(`${process.env.VOCAL_API}/v1/campaigns/cmp_.../resume`, {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.VOCAL_API_KEY}`,
'Idempotency-Key': crypto.randomUUID(),
'Content-Type': 'application/json',
},
body: JSON.stringify({}),
});
console.log(response.status, await response.text());import os
import uuid
import requests
response = requests.post(
f"{os.environ['VOCAL_API']}/v1/campaigns/cmp_.../resume",
headers={
"Authorization": f"Bearer {os.environ['VOCAL_API_KEY']}",
"Idempotency-Key": str(uuid.uuid4()),
},
json={},
)
print(response.status_code, response.text)Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
campaign_id | path | CampaignId | yes | The id of a Campaign: cmp_ and the row's UUIDv7 in 26 Crockford base32 characters. Opaque and safe to log. |
idempotency-key | header | string | no | A client-chosen key, kept 24 hours per Organization, environment and route. A replay returns the stored response. |
Request body
Content type application/json, required: CampaignReasonRequest.
| Field | Type | Required | Description |
|---|---|---|---|
reason | string | no | A snake_case code the Audit event records; never free text. |
Responses
| Status | Content type | Shape | Error codes |
|---|---|---|---|
200 | application/json | Campaign | |
400 | application/json | ErrorEnvelope | invalid_request |
401 | application/json | ErrorEnvelope | unauthenticated |
403 | application/json | ErrorEnvelope | forbidden, org_suspended |
404 | application/json | ErrorEnvelope | not_found |
409 | application/json | ErrorEnvelope | campaign_conflict, idempotency_in_progress, idempotency_key_reused |
422 | application/json | ErrorEnvelope | validation_failed |
429 | application/json | ErrorEnvelope | rate_limited |
500 | application/json | ErrorEnvelope | internal_error |
Fields of the 200 answer
The shape is Campaign.
| Field | Type | Required | Description |
|---|---|---|---|
archived | boolean | yes | True once DELETE archived an ended Campaign. |
arms | array of CampaignArm | yes | |
attestation | CampaignAttestation or null | yes | |
budget | CampaignBudget or null | yes | Required at launch. |
consent | CampaignConsent | yes | |
contact_caps | CampaignContactCaps or null | yes | |
created_at | Timestamp | yes | |
current_revision | integer or null | yes | The frozen revision in force; null before launch. |
ended_at | Timestamp or null | yes | |
environment | Environment | yes | |
error_code | string or null | yes | Why a failed Campaign failed; null otherwise. |
id | CampaignId | yes | |
identity | CampaignIdentity | yes | |
launched_at | Timestamp or null | yes | |
name | string | yes | A label, never PHI (product terms): no patient, condition or appointment. |
numbers | CampaignNumbers | yes | |
object | "campaign" | yes | |
on_exhausted | CampaignOnExhausted or null | yes | |
organization_id | OrganizationId | yes | |
outcome_routing | CampaignOutcomeRouting or null | yes | |
pacing | CampaignPacing | yes | |
paused_reason | CampaignPausedReason or null | yes | Why it is paused; null otherwise. |
project_id | ProjectId or null | yes | |
purpose | CampaignPurpose | yes | |
retry | CampaignRetry | yes | |
revision | integer | yes | The draft's revision, the ETag If-Match names. |
schedule | CampaignSchedule | yes | |
spend_micros | integer | yes | The rated charges of the Campaign's Calls so far. |
status | CampaignStatus | yes | |
supervisor_process_id | ProcessInstanceId or null | yes | The supervisor Process instance; null before launch. |
transport | CampaignTransport | yes | |
updated_at | Timestamp | yes | |
voicemail | CampaignVoicemail | yes | |
windows | CampaignWindow | yes |