Create a campaign
create_campaignCreate a campaign: an ordered sequence of email, wait and task steps run per contact, with follow-ups, stop rules (reply, bounce, unsubscribe and deal stage change stop a contact's sequence), a send window, caps and A/B variants. Pass steps inline, and optionally enroll to select contacts in the same call. It starts as a draft; call simulate_campaign, then launch_campaign. Delivery is a dry run (nothing leaves the system) until the operator switches sending on. Requires the manage_campaigns scope.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Campaign name. | |
| steps | No | Ordered steps. email: {type:"email", variants:[{subject, body, weight?}] or subject+body, condition?, reply_in_thread?}. wait: {type:"wait", days, business_days?}. task: {type:"task", title, due_in_days?, kind? (task|call|meeting), assignee? (human|agent), wait_for_done?}. Templates: {{first_name}} {{last_name}} {{name}} {{email}} {{title}} {{company.name}} {{company.domain}} {{fields.<key>}} {{sender.name}}, with {{var | default: "text"}}. | |
| enroll | No | Same selectors as enroll_contacts, applied right after creation. | |
| window | No | Local send window, default {"start":"09:00","end":"17:00"}. | |
| stop_on | No | reply, bounce, unsubscribe, deal_stage_change, contact_status_change. | |
| strategy | No | Your stated plan: who you are targeting and why. The operator reads it before approving. | |
| timezone | No | IANA zone for fixed mode. | |
| daily_cap | No | ||
| send_days | No | mon..sun, default weekdays. | |
| skip_dates | No | Dates like 2026-12-25 with no sending. | |
| description | No | Short description. | |
| identity_id | No | Sending identity id, default dry_run. | |
| track_opens | No | Default false. Opens are unreliable. | |
| timezone_mode | No | contact (default: each contact's own zone) or fixed. | |
| idempotency_key | No | Optional. Repeating a call with the same key and the same arguments returns the first result instead of writing again, so retries are safe. |