Skip to main content
POST
Create Campaign for a Group
Create a blank campaign for a group you have already found. Membership is frozen when the draft is created; new contacts do not join it automatically. Active status, a usable email address and other delivery exclusions are checked again before sending. This endpoint creates no sends and needs no sender setup. It saves contact IDs directly on the draft without creating a list, changing list memberships or enrolling contacts in sequences. The dashboard uses the same selection rules when you choose a campaign template for a filtered group; public clients create a blank draft and then update its content. You need campaigns:write and subscribers:read. An email_activity selection also needs analytics:read. Marketers can select marketing sources; viewers and restricted members cannot create drafts.

Select contacts

Omit subscriberIds to include every matching contact across pages. You can combine search, listId, activeOnly and excludedSubscriberIds with either segmentId, flat filters plus filterJoinOperator, or a nested root. Do not combine a saved segment with edited filters, or root with filters. Filters use the same fields and operators as subscriber filtering. Search follows contact search semantics. With no filters, the selection includes every contact in the company; email eligibility is reported separately.

Select an activity group

Choose one of campaignId, automationId, automationNodeId or transactionalId, or an audience of { "type": "list" | "segment", "id": "..." }. An audience can also narrow one email source. Supported events are send, delivery, open, click, bounce and unsubscribe. Periods are all, 1h, 24h, 7d, 30d and 90d; omitting the period selects all time. The selection also supports search, includeMachineEngagement, mailboxProvider, and bounce-only bounceType and bounceSubType. Whole-sequence activity includes regular email steps and A/B email variants. Each contact appears once even if they have multiple matching events. Deleted contacts in historical analytics are omitted. The dashboard additionally honors your global machine-engagement preference; API clients set includeMachineEngagement explicitly.

Response and next steps

201 returns campaign, including the linked blank email, and audience with source, selectedCount, eligibleCount and selectedAt. The saved targetLists uses { "type": "rules", "include": [], "includedSubscriberIds": [...] }. Use Get Campaign or Get Campaign Audience to review it. Update Campaign edits content, replaces targetLists, or clears it with null. Clearing removes the saved selection; review the resulting audience before scheduling. Selected IDs satisfy the include requirement even with an empty include array. Selections are limited to 100,000 matching contacts and 8 MiB of stored audience JSON. Activity selections apply the contact-count limit before removing deleted contacts. Oversized selections are rejected instead of truncated. Use a saved segment for a larger audience.

Errors

Errors return { "error": "..." }. Draft creation is atomic: a failed campaign insert does not leave an orphan email. Repeating a successful creation makes another draft; inspect your campaign list if a response is lost. Explicit included IDs override exclusions. To remove a contact from a frozen group, remove its ID from includedSubscriberIds. Creation-time selection.contacts.excludedSubscriberIds removes contacts before the group is frozen.