VocalDocscontracts 1.65.0

Launch a Campaign

POST /v1/campaigns/{campaign_id}/launch

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

Launches a draft (1.65.0; sections 3.8 and 7.3): every launch check runs and each failure is an issue of one 422 validation_failed (CampaignIssueCode), among them campaign_attestation_required without an attestation in force and campaign_budget_required without a budget; a test Campaign on phone is environment_not_allowed. A launch that passes pins each arm's active version, freezes revision 1, starts the supervisor and answers the Campaign scheduled before start_at, running after. A Campaign that is not a draft is campaign_conflict (not_draft).

Request

Set VOCAL_API to the base URL of your API and VOCAL_API_KEY to an API key with the campaigns:launch scope (Authentication and keys). Replace each placeholder, such as agt_... or <name>, with your own value.

curl -X POST "$VOCAL_API/v1/campaigns/cmp_.../launch" \
  -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
422application/jsonErrorEnvelopevalidation_failed, capability_not_available, environment_not_allowed
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