Schedule or start an email campaign. The campaign must be draft, paused or cancelled; otherwise 409.
Before scheduling a tag, segment or other filter audience, call Estimate Recipients and confirm that count with the user; never state a recipient count or sending limit you did not get from a response. Every scheduleType except batch sends to the whole audience at once (now, or at sendAt). A sending rate ("N every M minutes", "N per day") means batch with batchSize = N and the interval set to match.
Requirements by scheduleType:
immediate: scheduleConfig (can be {}); sends now.
scheduled: scheduleConfig.sendAt.
smart_send: scheduleConfig.sendAt; smart send starting at that time.
rss: rssConfig (name, rssFeedURL, repeatAfter, repeatAfterTime, plus startAtDay for every_week or startAtMonthDay for every_month). scheduleConfig is ignored and abTestConfig is rejected (400).
sendAt format is YYYY-MM-DD hh:mm A (e.g. 2026-04-01 09:00 AM), interpreted in timeZone (IANA name).
A/B test (any scheduleType except rss): set abTestConfig. With batch, the test starts at sendAt but scheduleConfig.batch settings are not applied to A/B sends.
testType=subjectLine: one entry per variation in abTestConfig.variations with its subject; every variation sends the campaign content.
testType=emailContent: version A (index 0) is the campaign content (set with Update Email Campaign). For each index ≥ 1 call Upsert A/B Variation first and pass the returned documentId as abTestConfig.variations[index].documentId. Never pass a template ID. A variation never created with Upsert A/B Variation and sent without documentId uses the campaign content.
To change a scheduled campaign: Pause Email Campaign (or Cancel Email Campaign), edit, then call Schedule Campaign again.
How an A/B test works (follow these steps in order):
Version A is the campaign itself. Create it with Create Email Campaign and edit it with Update Email Campaign.
Versions B, C, ... are stored inside the same campaign, not as separate campaigns or templates. Create or edit each one with Upsert A/B Variation (index 1 = B, 2 = C, ...; create them in order). Never create another campaign or template to make a version. Versions do not show in the campaign list, and the builder only shows them once the test is scheduled.
Check the versions before sending: Get Email Campaign lists them in abVersions (with each documentId); Validate Email Campaign checks every version (issues carry variationIndex); Preview Email Campaign and Test Send Email Campaign take variationIndex to show or test-send one version. Use these to read a version; Upsert A/B Variation creates the version when it is missing.
Start the test with Schedule Campaign abTestConfig: testType=emailContent with variations[index].documentId from abVersions (index 0 = version A, no documentId needed), or testType=subjectLine with one subject per version. Without abTestConfig the campaign sends version A only, and versions B, C, ... are never sent. The test group must give every version at least 10 contacts (see abTestConfig.testSize); otherwise Schedule Campaign returns 400.
Authorizations
Authorizationstringheaderrequired
Bearer authentication header of the form Bearer <token>, where <token> is your access token.
Unique key per intended write (max 255 chars). Retrying with the same key and body within 24 hours returns the first response instead of creating another resource. Reusing the key with a different body returns 422; a retry while the first request is still running returns 409.
Example:0f8fad5b-d9cb-469f-a165-70867728950e
Versionstringrequired
API Version
Available optionsv3
Example:v3
Path Parameters
locationIdstringrequired
Location ID
Example:ve9EPM428h8vShlRW1KT
campaignIdstringrequired
Campaign ID
Example:67f15c2ae99226d5bcccb8f3
Body
application/json
scheduleTypestringrequired
immediate (send now), scheduled (at sendAt), smart_send (smart send from sendAt), batch (drip in batches from sendAt, needs scheduleConfig.batch), rss (recurring from an RSS feed, needs rssConfig).
Available optionsimmediatescheduledbatchrsssmart_send
Example:immediate
timeZonestringrequired
IANA timezone used to interpret sendAt and batch/RSS times
Example:America/New_York
userIdstringrequired
ID of the user performing this action
Example:507f1f77bcf86cd799439099
userNamestring
Name of the user performing this action
Example:John Doe
emailMetaobjectrequired
Email subject, sender, and content metadata
Example
{"subject":"Our February Newsletter","fromName":"John Doe","fromEmail":"[email protected]"}
Recipient selection type. smart_list, custom_segment and all resolve like the Schedule page; use Estimate Recipients first to confirm the size. all sends to every contact in the location.
Available optionscontacttagsegmentsmart_listcustom_segmentall
Example:contact
recipients.contactIdsstring[]
Contact IDs to send to. Required when type is contact. Every ID must be a contact in this location; if any is not, nothing is scheduled and the request returns 422. Review the number of contacts with the user before sending.
Example:["contactId1","contactId2"]
recipients.tagIdsstring[]
Tag IDs to filter recipients by. Required when type is tag.
Example:["tagId1","tagId2"]
recipients.segmentstring
Segment type for pre-built segments. Required when type is segment.
Available optionsengaged_last_7_daysengaged_last_30_daysengaged_last_60_daysengaged_last_5_campaignsunengaged_last_5_campaigns
Example:engaged_last_7_days
recipients.smartListIdsstring[]
Smart list IDs (from List Audience Options, source smart_list). Required when type is smart_list; only the first is used.
Example:["smartListId1"]
recipients.conditionsobject[]
Built segment rows, the Schedule page "Build segments" picker. Required when type is custom_segment.
subjectLine: variations differ only by subject. emailContent: variations differ by content; create versions B, C, ... with Upsert A/B Variation first.
Available optionsemailContentsubjectLine
Example:subjectLine
abTestConfig.testDurationnumberrequired
Seconds to run the test before picking a winner
Example:3600
abTestConfig.variationCountnumberrequired
Number of variations, including version A. Must match variations.length.
Example:2
abTestConfig.testSizenumberrequired
Percentage of the audience in the test group (0-100). Each version must get at least 10 contacts: floor(floor(audience × testSize / 100) / variationCount) must be 10 or more, or Schedule Campaign returns 400. Example: 27 contacts and 2 versions need testSize 75 or higher.
Example:30
abTestConfig.winningCriteriastringrequired
How to pick the winner
Available optionsopenRateclickRate
Example:openRate
abTestConfig.variationsobject[]required
One entry per variation; index 0 is version A (the campaign itself).
Example
[{"subject":"Subject A"},{"subject":"Subject B"}]
abTestConfig.variations[].subjectstring
Subject line for this variation
Example:Subject A
abTestConfig.variations[].documentIdstring
Variation document ID, for testType emailContent only. Index 0: omit (the campaign content is used). Index ≥ 1: the documentId returned by Upsert A/B Variation for that index. Never a template ID. When omitted, a variation already created with Upsert A/B Variation keeps its document; otherwise the campaign content is sent.