Skip to main content
CampaignsVersion: v3New

Schedule Campaign

POST/emails/locations/{locationId}/campaigns/emails/{campaignId}/schedule

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.
  • batch: scheduleConfig.sendAt (first batch) and scheduleConfig.batch (batchSize, interval, intervalUnit, optional skipDays, windowStart/windowEnd).
  • 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):

  1. Version A is the campaign itself. Create it with Create Email Campaign and edit it with Update Email Campaign.
  2. 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.
  3. 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.
  4. 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.

Scope:emails/campaigns.write
Auth methods:OAuthPrivate Integration
Token type:Sub-Account Token

Request​

Headers

Idempotency-Keystring

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

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]"
}
recipientsobjectrequired

Who receives the email. Must provide either contactIds or filter.

Example
{
  "type": "contact",
  "contactIds": [
    "contactId1",
    "contactId2"
  ]
}
sendDaysstring[]

Days of the week to allow sending. Used for batch and RSS scheduleTypes.

Available optionsMonTueWedThuFriSatSun
Example:["Mon","Tue","Wed","Thu","Fri","Sat","Sun"]
scheduleConfigobject

Schedule configuration for immediate, scheduled, batch, and smart_send types. Required when scheduleType is not rss.

Example
{
  "sendAt": "2026-04-01 09:00 AM"
}
rssConfigobject

RSS feed configuration. Required when scheduleType is rss.

Example
{
  "name": "Weekly Digest",
  "rssFeedURL": "https://example.com/rss",
  "repeatAfter": "every_day",
  "repeatAfterTime": "09:00 AM"
}
abTestConfigobject

A/B test configuration. Can be combined with any scheduleType except rss.

Example
{
  "testType": "subjectLine",
  "testDuration": 3600,
  "variationCount": 2,
  "testSize": 30,
  "winningCriteria": "openRate",
  "variations": [
    {
      "subject": "Subject A"
    },
    {
      "subject": "Subject B"
    }
  ]
}

Response

Success

campaignIdstringrequired

Campaign ID

Example:67f15c2ae99226d5bcccb8f3
sourceIdstringnullablerequired

Source ID for fetching campaign statistics

Example:B67vyPIAfq3Bnk3FVioE
traceIdstring

Trace ID of the request

Example:019e4ef5-a65e-4198-8cf9-8e93dca9bda4