campaigns

Add campaign targets

Transport: call this endpoint with HTTP POST and a JSON request body. Add recipients to an existing campaign. Active fixed and continuous campaigns can admit new recipients with personalized_steps without pausing or reactivation. Existing recipients and shared campaign steps remain unchanged.

Required for personalized enrollment: a stable idempotency_key (match the Idempotency-Key header when used) and complete personalized_steps covering every content-bearing step_order.

Approval: stages campaign_enroll_personalized_targets. Eligible Autopilot applies and schedules in the same call; otherwise show approval_url, wait, then repeat the identical request with confirmation_id.

Idempotency: Same key and same payload replays; Same key with changed recipients or copy returns IDEMPOTENCY_KEY_CONFLICT; PERSONALIZED_ENROLLMENT_CONFIRMATION_REJECTED is terminal and a new key requires a new user request.

Response: approved copy is stored as immutable personalized_snapshot_v1 snapshots; read content_mode, scheduling_occurred, and each disposition's scheduled, schedule_deferred, and schedule_defer_reason.

Recovery: PERSONALIZED_SEQUENCE_INCOMPLETE (missing step copy); CAMPAIGN_PERSONALIZED_SNAPSHOT_INVALID (a draft/paused campaign's approved step structure drifted); active fixed generic additions require pause, add, validate, fresh campaign_activate approval, and reactivation; terminal campaigns require a new campaign.

post/v1/campaigns/addTargets

Request

  • Base URL: https://api.zevari.ai
  • URL: https://api.zevari.ai/v1/campaigns/addTargets
  • Auth: HTTP bearer

Headers

Idempotency-Keystring

Optional REST transport for the enrollment idempotency key (8-200 characters). Active enrollment and every personalized enrollment require a key in this header or body idempotency_key. When both are sent they must match. Existing draft/paused generic body-only requests remain compatible.

Request body

campaign_idstring required

Campaign ID to enroll targets into

idempotency_keystring

Stable caller-generated key for safe retries. Reusing the key with the same batch returns the original result; a key whose previous attempt was REJECTED may be reused with corrected content.

confirmation_idstring

Approval for action_type='campaign_enroll_personalized_targets'. Omit on the first personalized call: Zevari stages the approval. After approval, retry with this ID and the same idempotency_key — targets may be omitted; the stored approved batch is executed.

Response

Enrollment accepted, scheduled, or replayed idempotently. Inspect next_action and per-target dispositions.

okboolean required

False when the underlying tool reports an error or a partial failure.

methodstring required

Public API method name.

dataunknown required
request_idstring required

Request correlation ID. Also returned in X-Zevari-Request-Id.

Example response

{
  "method": "campaigns.delete"
}

Changes

No recorded changes to this operation across all 1 revision of this API.