VocalDocscontracts 1.65.0

Dry-run a Campaign

POST /v1/campaigns/{campaign_id}/dry-run

PropertyValue
Operationdry_run_campaign
GroupCampaigns
Scopecampaigns:write
Route classcontrol
IdempotencyIdempotency-Key accepted: a retry with the same key replays the first answer
AuditNot audited: A dry run: it writes nothing and answers counts and codes, so no Audit event (ADR 0012).
Released in1.65.0
Phase 0 hostServed (the hosted api pins 1.65.0)

Answers what the Campaign would do now (1.65.0; section 9): the enrollments eligible and ineligible by code, the arm split, the next window opening, an estimated duration, the disposition of each sample attempt under the draft's or the revision's table, and the issues a launch would refuse with. It writes nothing and holds counts and codes only.

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_.../dry-run" \
  -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: CampaignDryRunRequest.

FieldTypeRequiredDescription
samplesarray of CampaignDryRunSampleInputno

Responses

StatusContent typeShapeError codes
200application/jsonCampaignDryRun
400application/jsonErrorEnvelopeinvalid_request
401application/jsonErrorEnvelopeunauthenticated
403application/jsonErrorEnvelopeforbidden, org_suspended
404application/jsonErrorEnvelopenot_found
422application/jsonErrorEnvelopevalidation_failed
429application/jsonErrorEnveloperate_limited
500application/jsonErrorEnvelopeinternal_error

Fields of the 200 answer

The shape is CampaignDryRun.

FieldTypeRequiredDescription
arm_splitmap of integeryes
campaign_idCampaignIdyes
dispositionsarray of CampaignDispositionyesThe disposition of each sample, in order.
eligibleintegeryes
estimated_duration_sinteger or nullyesAn estimate from pacing and windows, never a measurement.
ineligiblemap of integeryesThe enrollments that would be ineligible, by code.
launch_issuesarray of CampaignIssueCodeyesWhat a launch now would refuse with; empty when it would pass.
next_window_opens_atTimestamp or nullyes
object"campaign_dry_run"yes
revisioninteger or nullyesThe revision judged; null for a draft.