VocalDocscontracts 1.65.0

Publish a revision of a Campaign

POST /v1/campaigns/{campaign_id}/revisions

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

Freezes the next revision of a running or paused Campaign from the blocks the body names over the revision in force, applied from the next tick and admission (1.65.0; section 3.8), by an owner or admin (owner_or_admin_required), an Audit event. A field fixed at launch is campaign_revision_field_fixed; a Campaign in another status is campaign_conflict. The Idempotency-Key makes a repeated request answer the same revision.

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_.../revisions" \
  -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: CampaignRevisionRequest.

FieldTypeRequiredDescription
budgetCampaignBudgetInputno
contact_capsCampaignContactCapsInputno
end_atRequestTimestampno
pacingCampaignPacingInputno
retryCampaignRetryInputno
windowsCampaignWindowInputno

Responses

StatusContent typeShapeError codes
201application/jsonCampaignRevision
400application/jsonErrorEnvelopeinvalid_request
401application/jsonErrorEnvelopeunauthenticated
403application/jsonErrorEnvelopeforbidden, org_suspended
404application/jsonErrorEnvelopenot_found
409application/jsonErrorEnvelopecampaign_conflict, idempotency_in_progress, idempotency_key_reused
422application/jsonErrorEnvelopevalidation_failed
429application/jsonErrorEnveloperate_limited
500application/jsonErrorEnvelopeinternal_error

Fields of the 201 answer

The shape is CampaignRevision.

FieldTypeRequiredDescription
arm_versionsarray of CampaignArmVersionyes
campaign_idCampaignIdyes
configCampaignConfigyes
config_sha256stringyesThe SHA-256 of the canonical JSON (RFC 8785) of config, in lowercase hex.
created_atTimestampyes
created_byActorRefyes
object"campaign_revision"yes
revisionintegeryesFrom 1, the launch.