create_campaign
Create a campaign targeting a sending domain's contact pool, configuring subject, content, segments, A/B tests, follow-ups, and recurrence for later sending.
Instructions
Create a campaign targeting a sending domain's contact pool (POST /campaigns, domain-first). Send it later with send_campaign.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| from | No | Sender, e.g. "Acme <hi@yourdomain.com>". Defaults to the configured sender. | |
| html | No | ||
| name | No | Internal name for the campaign. | |
| text | No | ||
| domain | Yes | The sending domain whose contacts this campaign targets, e.g. 'yourdomain.com'. Orthogonal to `from` — the from address may be a different verified domain. | |
| ab_test | No | A/B test config, e.g. { enabled: true, subject_b, test_pct, metric: 'open'|'click'|'reply', eval_hours: 1-168 }. eval_hours sets how long to run the test before evaluating and sending the winner. | |
| list_to | No | Show a generated mailing-list address (recipient-<hex>@your-domain) as the visible To; delivery stays individual. | |
| subject | Yes | Subject line. | |
| reply_to | No | ||
| topic_id | No | Gate recipients by a topic subscription. | |
| followups | No | Engagement follow-ups (max 5): [{ condition: opened|clicked|not_opened|not_clicked|replied|not_replied, delay: '5 hours', subject?, html }] — sent after the campaign finishes, threaded as replies. | |
| recurrence | No | Make this a recurring campaign. | |
| segment_id | No | Target a segment (subset of the audience). | |
| preview_text | No | ||
| recurrence_every | No | Periods between recurring sends (1-365). Defaults to 1. | |
| unsubscribe_policy | No | How the unsubscribe list applies: 'account' (default), 'domain' (only this sending domain's opt-outs block), 'ignore' (opt-outs skipped; bounces/complaints always excluded). |