Campaigns
Documentation for emails API
Create Email Campaign
Create a draft email campaign: an email you intend to send to contacts, in the code (`html`), plain-text (`text`) or design (`builder`) editor: blank, from an existing template (`templateId`), or with initial `editorContent`. Then set content, subject and sender with Update Email Campaign and send with Schedule Campaign. For a reusable design that is not sent by itself, or when the user asks for a template, use Create an email template instead; a campaign can later start from it with `templateId`. A/B versions of a campaign are made with Upsert A/B Variation, not by creating another campaign.
List Email Campaigns
Get list of email campaigns for a location. Status lifecycle: `draft` (created, editable) β Schedule Campaign β `scheduled` (waiting for `sendAt` or the next batch) β `processing` (sending) β `sent`. RSS campaigns have no `scheduled` state: while active, including between feed checks, they report `processing` or the status of their latest send. `failed` = sending errored. Pause Email Campaign: `scheduled`/`processing` β `paused`; Resume Email Campaign: `paused` β `processing`. Cancel Email Campaign: `scheduled`/`processing`/`paused` β `cancelled`. `draft`, `paused` and `cancelled` campaigns can be (re)scheduled with Schedule Campaign. `archived` = archived campaign (any underlying status).
Update Email Campaign
Update the name or content of an email campaign (A/B version A). Edit content while the campaign is `draft`, or after Pause/Cancel Email Campaign. For A/B versions B, C, ... use Upsert A/B Variation.
Get Email Campaign by ID
Get a single email campaign by its ID. Pass `includeContent=true` to get the current `editorContent` (version A). `abVersions` lists its A/B versions B, C, ... Status lifecycle: `draft` (created, editable) β Schedule Campaign β `scheduled` (waiting for `sendAt` or the next batch) β `processing` (sending) β `sent`. RSS campaigns have no `scheduled` state: while active, including between feed checks, they report `processing` or the status of their latest send. `failed` = sending errored. Pause Email Campaign: `scheduled`/`processing` β `paused`; Resume Email Campaign: `paused` β `processing`. Cancel Email Campaign: `scheduled`/`processing`/`paused` β `cancelled`. `draft`, `paused` and `cancelled` campaigns can be (re)scheduled with Schedule Campaign. `archived` = archived campaign (any underlying status).
Delete Campaign
Delete a campaign
List Workflow Campaigns
Get list of workflow campaigns for a location
Get Workflow Campaign by ID
Get a single workflow campaign by its ID
List Bulk Action Campaigns
Get list of bulk action campaigns for a location
Get Bulk Action Campaign by ID
Get a single bulk action campaign by its ID
Schedule Campaign
Schedule or start an email campaign. The campaign must be `draft`, `paused` or `cancelled`; otherwise 409.
Pause Email Campaign
Pause a campaign that is `scheduled` or `processing` (including batch/drip sends, RSS schedules and A/B tests). Sending stops until Resume Email Campaign is called. While paused you can edit content with Update Email Campaign, then call Resume Email Campaign or Schedule Campaign to reschedule with new settings. Returns 409 for any other status.
Resume Email Campaign
Resume a `paused` campaign with its existing schedule settings (batch progress and RSS cadence continue where they stopped). For an A/B test, winner selection stays due at the original start plus `testDuration`; if that time has passed while paused, the winner is picked right away. To change schedule settings instead, call Schedule Campaign on the paused campaign. Returns 409 for any other status.
Cancel Email Campaign
Cancel a campaign that is `scheduled`, `processing` or `paused`. Pending sends, batch/drip sends, RSS schedules, A/B variations and any resend-to-unopened follow-up are stopped. Emails already sent are not recalled. A cancelled campaign can be edited and scheduled again with Schedule Campaign. Returns 409 for any other status.
Upsert A/B Variation
Get or create the campaign-owned document for A/B variation `index` (1 = version B, 2 = version C, ...) and optionally write its content. A missing variation is cloned from the campaign's current content. Version A (index 0) is the campaign itself: edit it with Update Email Campaign.
Duplicate Email Campaign
Clone this campaign and its content into a new draft. The copy is not scheduled. Omit name to keep the source name.
Archive Email Campaign
Archive this campaign. Repeated requests return archived=true without toggling the state. This changes visibility; it does not cancel sending.
Unarchive Email Campaign
Restore this campaign from the archive. Repeated requests return archived=false without toggling the state.
Preview Email Campaign
Return the stored rendered HTML, subject and preview text of this campaign exactly as saved, with the merge fields ({{...}}) it still contains. Shows version A unless `variationIndex` picks an A/B version (1 = B, 2 = C, ...). Sends no email; merge fields are filled in per contact at send time.
Validate Email Campaign Before Sending
Inspect rendered HTML and intended sender metadata for missing subject, sender, unsubscribe link, broken placeholders, merge field syntax the send cannot parse (INVALID_MERGE_FIELD_SYNTAX) and unresolved fields. Optional overrides are checked without saving. ready means no content errors. Warns with SENDER_DOMAIN_NOT_VERIFIED when the sender is not on a location sending domain (see List Sending Domains); it does not verify delivery.
List Sending Domains
List the domains this location can send email campaigns from, the same choices the schedule screen offers. Pick the sender address (fromEmail) on one of these domains before scheduling. smtpMode=true means the location sends through its own SMTP provider instead.
List Audience Options
Find the tags, smart lists (the calling userβs saved lists) or engagement segments a campaign can target, with the ids to use in Estimate Recipients and Schedule Campaign. Contacts are not listed here.
Estimate Recipients
Count how many contacts match an audience right now (contact, tag, segment, smart_list, custom_segment or all) and get a one-line summary to confirm with the user before scheduling. The count is before send-time suppression: do-not-disturb, unsubscribed and contacts without a valid email are skipped at send, so tell the user it is the most that can receive the campaign, not a delivery count. Returns the count only, never contact ids. Write-scoped because an exact count for any filter would otherwise let a read-only token enumerate contacts.
Test Send Email Campaign
Send this campaign as a test to one to five email addresses: version A, or the A/B version picked with `variationIndex` (1 = B, 2 = C, ...), with the saved campaign subject and sender unless overridden; merge fields are filled with sample contact data, not the real recipient values. Limited to 20 test requests per location per hour, shared with template tests. Send an Idempotency-Key so a retry does not send twice. Acceptance does not confirm delivery.