VocalDocscontracts 1.65.0

Pause a Campaign

POST /v1/campaigns/{campaign_id}/pause

PropertyValue
Operationpause_campaign
GroupCampaigns
Scopecampaigns:write
Route classcontrol
IdempotencyIdempotency-Key accepted: a retry with the same key replays the first answer
AuditAudited campaigns.campaign.pause (mutation)
Released in1.65.0
Phase 0 hostServed (the hosted api pins 1.65.0)

Pauses a running Campaign with the reason member (1.65.0): outstanding permits are revoked and live Calls finish. A paused one is answered as it stands; another status is campaign_conflict (not_running).

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_.../pause" \
  -H "Authorization: Bearer $VOCAL_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{}'

Parameters

NameInTypeRequiredDescription
campaign_idpathCampaignIdyesThe id of a Campaign: cmp_ and the row's UUIDv7 in 26 Crockford base32 characters. Opaque and safe to log.
idempotency-keyheaderstringnoA 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.

FieldTypeRequiredDescription
reasonstringnoA snake_case code the Audit event records; never free text.

Responses

StatusContent typeShapeError codes
200application/jsonCampaign
400application/jsonErrorEnvelopeinvalid_request
401application/jsonErrorEnvelopeunauthenticated
403application/jsonErrorEnvelopeforbidden, org_suspended
404application/jsonErrorEnvelopenot_found
409application/jsonErrorEnvelopecampaign_conflict, idempotency_in_progress, idempotency_key_reused
429application/jsonErrorEnveloperate_limited
500application/jsonErrorEnvelopeinternal_error

Fields of the 200 answer

The shape is Campaign.

FieldTypeRequiredDescription
archivedbooleanyesTrue once DELETE archived an ended Campaign.
armsarray of CampaignArmyes
attestationCampaignAttestation or nullyes
budgetCampaignBudget or nullyesRequired at launch.
consentCampaignConsentyes
contact_capsCampaignContactCaps or nullyes
created_atTimestampyes
current_revisioninteger or nullyesThe frozen revision in force; null before launch.
ended_atTimestamp or nullyes
environmentEnvironmentyes
error_codestring or nullyesWhy a failed Campaign failed; null otherwise.
idCampaignIdyes
identityCampaignIdentityyes
launched_atTimestamp or nullyes
namestringyesA label, never PHI (product terms): no patient, condition or appointment.
numbersCampaignNumbersyes
object"campaign"yes
on_exhaustedCampaignOnExhausted or nullyes
organization_idOrganizationIdyes
outcome_routingCampaignOutcomeRouting or nullyes
pacingCampaignPacingyes
paused_reasonCampaignPausedReason or nullyesWhy it is paused; null otherwise.
project_idProjectId or nullyes
purposeCampaignPurposeyes
retryCampaignRetryyes
revisionintegeryesThe draft's revision, the ETag If-Match names.
scheduleCampaignScheduleyes
spend_microsintegeryesThe rated charges of the Campaign's Calls so far.
statusCampaignStatusyes
supervisor_process_idProcessInstanceId or nullyesThe supervisor Process instance; null before launch.
transportCampaignTransportyes
updated_atTimestampyes
voicemailCampaignVoicemailyes
windowsCampaignWindowyes