VocalDocscontracts 1.65.0

Update a Campaign draft

PATCH /v1/campaigns/{campaign_id}

PropertyValue
Operationupdate_campaign
GroupCampaigns
Scopecampaigns:write
Route classcontrol
IdempotencyNo Idempotency-Key
AuditAudited campaigns.campaign.update (mutation)
Released in1.65.0
Phase 0 hostServed (the hosted api pins 1.65.0)

Replaces the named fields of a draft at the revision If-Match names and answers the next revision (1.65.0), checked as a create is. A launched Campaign changes only by a revision (create_campaign_revision): its draft update is 409 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:write scope (Authentication and keys). Replace each placeholder, such as agt_... or <name>, with your own value.

curl -X PATCH "$VOCAL_API/v1/campaigns/cmp_..." \
  -H "Authorization: Bearer $VOCAL_API_KEY" \
  -H 'If-Match: "1"' \
  -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.
if-matchheaderstringyesThe revision the change was made against, quoted as the ETag returns it, or * to overwrite.

Request body

Content type application/json, required: CampaignUpdateRequest.

FieldTypeRequiredDescription
armsarray of CampaignArmInputno
budgetCampaignBudgetInputno
consentCampaignConsentInputno
contact_capsCampaignContactCapsInputno
identityCampaignIdentityInputno
namestringnoA label, never PHI (product terms): no patient, condition or appointment.
numbersCampaignNumbersInputno
on_exhaustedCampaignOnExhaustedInputno
outcome_routingCampaignOutcomeRoutingInputno
pacingCampaignPacingInputno
purposeCampaignPurposeno
retryCampaignRetryInputno
scheduleCampaignScheduleInputno
transportCampaignTransportno
voicemailCampaignVoicemailInputno
windowsCampaignWindowInputno

Responses

StatusContent typeShapeError codes
200application/jsonCampaign
400application/jsonErrorEnvelopeinvalid_request
401application/jsonErrorEnvelopeunauthenticated
403application/jsonErrorEnvelopeforbidden, org_suspended
404application/jsonErrorEnvelopenot_found
409application/jsonErrorEnvelopecampaign_conflict
412application/jsonErrorEnveloperevision_mismatch
422application/jsonErrorEnvelopevalidation_failed, capability_not_available
428application/jsonErrorEnvelopeprecondition_required
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