Menu

Unschedule a campaign

POST/v1/campaigns/{id}/unschedule

Requires an API key with the campaigns:write scope. About keys and scopes

Returns a scheduled campaign to draft, so nothing goes out at its sendAt. A campaign that is not scheduled returns 409 CONFLICT; one already sending is stopped with cancel instead. Needs campaigns:write, so agent keys may stop a send.

Path parameters

idstringrequired

uuid

Returns

Returns 200 OK with a Campaign in data. Otherwise returns an error; Errors lists every code and which to retry.

idstringrequired

uuid

namestringrequired
channelsstring[]required

The channels it sends on.

groupIdstring | nullrequired

The group it goes to, if any.

uuid

segmentIdstring | nullrequired

The segment it goes to, if any.

uuid

audienceRulesobject | nullrequired

Inline rules choosing the audience, if any. At most one audience is set.

One of 2 shapes
Match all
1 child attribute
allobject[]required

Every rule or nested group must match.

at least 1 item · at most 20 items

Match any
1 child attribute
anyobject[]required

At least one rule or nested group must match.

at least 1 item · at most 20 items

topicIdstring | nullrequired

Sends only to contacts the topic reaches; null sends to everyone with consent.

uuid

messageLimitsMessageLimitUserequired
2 child attributes
applybooleanrequired
retryHoursintegeroptional

min 0 · max 48

utmobject | nullrequired

UTM parameters added to the links in the email.

6 child attributes
enabledbooleanrequired
sourcestringoptional

1–100 characters

mediumstringoptional

1–100 characters

campaignstringoptional

1–100 characters

contentstringoptional

1–100 characters

termstringoptional

1–100 characters

contentCampaignContentrequired
4 child attributes
emailobjectoptional

The email fields; any may be missing on a draft.

6 child attributes
subjectstringoptional

The subject line. Merge tags are allowed.

1–998 characters

previewTextstringoptional

Shown by inboxes after the subject. Merge tags are allowed; keep it near 100 characters.

1–255 characters

htmlstringoptional

The HTML body. Rendered from the design when one is set.

1–512000 characters

textstringoptional

The plain-text alternative.

1–512000 characters

fromstringoptional

The sender address, on a verified sending domain.

1–320 characters

replyTostringoptional

Where replies go.

email

pushProjectIdstringoptional

The push app the notification goes out through.

uuid

pushobjectoptional

The notification content.

13 child attributes
titlestringoptional

The notification title (up to 100 characters).

1–100 characters

bodystringoptional

The notification text (up to 500 characters).

1–500 characters

actionUrlstringoptional

The HTTPS page opened when the notification is tapped.

uri · up to 2048 characters

imageUrlstringoptional

A large picture: web and Android show it; iOS needs the app's service extension.

uri · up to 2048 characters

iconUrlstringoptional

Web only; iOS and Android show the app's own notification icon.

uri · up to 2048 characters

dataobjectoptional

Up to 10 string key-value pairs passed to the app untouched, for deep links and in-app routing.

buttonsobject[]optional

Up to 2 action buttons.

at least 1 item · at most 2 items

2 child attributes
titlestringrequired

The button label.

1–30 characters

urlstringrequired

The HTTPS page the button opens.

uri · up to 2048 characters

collapseKeystringoptional

A newer notification with the same key replaces the older one on the device.

soundstringoptional

The name of a sound the app ships; the device's default if unset.

1–64 characters

badgeintegeroptional

The number shown on the iOS app icon.

min 0 · max 99999

ttlSecondsintegeroptional

Seconds a provider keeps trying an offline device (up to 28 days); defaults to 86400 (one day).

min 0 · max 2419200

urgencystringoptional

high wakes the device now; normal lets it wait for a good moment to save battery. Unset, a transactional push is high and any other normal.

one of high, normal

overridesobjectoptional

Fields that differ on one platform, each replacing the shared one there (a whole data map, not merged key by key). On iOS and Android actionUrl may be an app link such as myapp://orders; the shared one and the web one must be HTTPS.

3 child attributes
iosobjectoptional

Replaces shared fields on iOS.

14 child attributes
titlestringoptional

The notification title (up to 100 characters).

1–100 characters

bodystringoptional

The notification text (up to 500 characters).

1–500 characters

actionUrlstringoptional

up to 2048 characters

imageUrlstringoptional

A large picture: web and Android show it; iOS needs the app's service extension.

uri · up to 2048 characters

iconUrlstringoptional

Web only; iOS and Android show the app's own notification icon.

uri · up to 2048 characters

dataobjectoptional

Up to 10 string key-value pairs passed to the app untouched, for deep links and in-app routing.

buttonsobject[]optional

Up to 2 action buttons.

at least 1 item · at most 2 items

collapseKeystringoptional

A newer notification with the same key replaces the older one on the device.

soundstringoptional

The name of a sound the app ships; the device's default if unset.

1–64 characters

badgeintegeroptional

The number shown on the iOS app icon.

min 0 · max 99999

ttlSecondsintegeroptional

Seconds a provider keeps trying an offline device (up to 28 days); defaults to 86400 (one day).

min 0 · max 2419200

urgencystringoptional

high wakes the device now; normal lets it wait for a good moment to save battery. Unset, a transactional push is high and any other normal.

one of high, normal

interruptionLevelstringoptional

How iOS presents it: passive arrives silently, time-sensitive breaks through Focus and needs the app's Time Sensitive Notifications capability.

one of passive, active, time-sensitive

threadIdstringoptional

Notifications with the same thread are grouped together in Notification Center.

androidobjectoptional

Replaces shared fields on Android.

13 child attributes
titlestringoptional

The notification title (up to 100 characters).

1–100 characters

bodystringoptional

The notification text (up to 500 characters).

1–500 characters

actionUrlstringoptional

up to 2048 characters

imageUrlstringoptional

A large picture: web and Android show it; iOS needs the app's service extension.

uri · up to 2048 characters

iconUrlstringoptional

Web only; iOS and Android show the app's own notification icon.

uri · up to 2048 characters

dataobjectoptional

Up to 10 string key-value pairs passed to the app untouched, for deep links and in-app routing.

buttonsobject[]optional

Up to 2 action buttons.

at least 1 item · at most 2 items

collapseKeystringoptional

A newer notification with the same key replaces the older one on the device.

soundstringoptional

The name of a sound the app ships; the device's default if unset.

1–64 characters

badgeintegeroptional

The number shown on the iOS app icon.

min 0 · max 99999

ttlSecondsintegeroptional

Seconds a provider keeps trying an offline device (up to 28 days); defaults to 86400 (one day).

min 0 · max 2419200

urgencystringoptional

high wakes the device now; normal lets it wait for a good moment to save battery. Unset, a transactional push is high and any other normal.

one of high, normal

channelIdstringoptional

The Android notification channel to post in, which the app creates; it sets the sound and importance a person can tune, e.g. one for offers and one for orders.

webobjectoptional

Replaces shared fields on web.

12 child attributes
titlestringoptional

The notification title (up to 100 characters).

1–100 characters

bodystringoptional

The notification text (up to 500 characters).

1–500 characters

actionUrlstringoptional

The HTTPS page opened when the notification is tapped.

uri · up to 2048 characters

imageUrlstringoptional

A large picture: web and Android show it; iOS needs the app's service extension.

uri · up to 2048 characters

iconUrlstringoptional

Web only; iOS and Android show the app's own notification icon.

uri · up to 2048 characters

dataobjectoptional

Up to 10 string key-value pairs passed to the app untouched, for deep links and in-app routing.

buttonsobject[]optional

Up to 2 action buttons.

at least 1 item · at most 2 items

collapseKeystringoptional

A newer notification with the same key replaces the older one on the device.

soundstringoptional

The name of a sound the app ships; the device's default if unset.

1–64 characters

badgeintegeroptional

The number shown on the iOS app icon.

min 0 · max 99999

ttlSecondsintegeroptional

Seconds a provider keeps trying an offline device (up to 28 days); defaults to 86400 (one day).

min 0 · max 2419200

urgencystringoptional

high wakes the device now; normal lets it wait for a good moment to save battery. Unset, a transactional push is high and any other normal.

one of high, normal

templateSnapshotobjectoptional

The email design, copied into the campaign so later template edits do not change it.

4 child attributes
schemaVersionintegerrequired

min > 0 · max 1000

blocksEmailBlock[]required

At most 200 blocks across the entire tree and five levels including the root. Footer blocks must remain at root. Known child fields are validated recursively.

at least 1 item · at most 200 items

7 child attributes
idstringrequired

Identifies the block within the template; unique among its blocks.

1–128 characters

typestringrequired

The block type: header, heading, text, image, button, divider, spacer, columns, columns3, imagetext, imagegroup, boxed, quote, list, product, video, social, menu, html, section, footer, repeat, shared. Each type reads its own fields next to type; an unknown type is kept but not validated.

1–64 characters

styleEmailBlockStyleoptional

Visual overrides for this block, such as colours, font and spacing.

17 child attributes
backgroundColorstringoptional

Fill behind the block.

fontFamilystringoptional

A font every client has (Arial, Verdana, Georgia, Tahoma, Times New Roman, Courier New), or a web font, which shows where the client loads it and falls back to a safe font elsewhere.

one of Arial, Verdana, Georgia, Tahoma, Times New Roman, Courier New, Inter, Roboto, Open Sans, Lato, Montserrat, Poppins, DM Sans, Nunito, Work Sans, Oswald, Playfair Display, Merriweather, Lora, Libre Baskerville, EB Garamond

fontSizeintegeroptional

Text size in px, 12 to 72.

min 12 · max 72

mobileFontSizeintegeroptional

Text size in px on phones (screens up to 620px), 12 to 72.

min 12 · max 72

paddingobjectoptional

Space inside the block in px, 0 to 100 per side; omitted sides keep their default.

borderWidthintegeroptional

Border thickness in px; 0 for none.

min 0 · max 10

borderStylestringoptional

Border line style.

one of solid, dashed, dotted

borderColorstringoptional

Border colour.

borderRadiusintegeroptional

Corner rounding in px, 0 to 100.

min 0 · max 100

textColorstringoptional

Text colour.

linkColorstringoptional

Colour of links in the text.

letterSpacingnumberoptional

Space between letters in px, such as 3 for a spaced-out eyebrow line.

min -2 · max 20

textTransformstringoptional

Set to uppercase to capitalise all text.

one of none, uppercase

lineHeightnumberoptional

A multiple of the font size.

min 1 · max 3

fontWeightstringoptional

Text weight.

one of regular, bold

fontStylestringoptional

Text style.

one of normal, italic

insetbooleanoptional

Draw the background and border as a box within the content width, not across the whole row.

visibleIfobjectoptional

Show the block only to contacts these segment rules match, checked as each message is rendered. Omit to show it to everyone. Not allowed on the footer.

One of 2 shapes
Match all
Match any
showOnstringoptional

Show the block only on phones (screens up to 620px) or only on wider screens. Clients that ignore screen size show the desktop version, and so does plain text. Omit to show it everywhere. Not allowed on the footer.

one of mobile, desktop

columnsobject[][]optional

Nested child block arrays: exactly two for columns, three for columns3. Each child follows this block contract. Omit to retain legacy text columns.

at most 3 items

blocksobject[]optional

A section's child blocks, drawn inside its box; or a repeat block's, written out once per item of its list, where {{ item.<field> }} reads that item. Repeats do not nest.

at most 200 items

themeEmailThemerequired
11 child attributes
fontstringoptional

Body font stack, such as Inter, sans-serif.

up to 200 characters

hfontstringoptional

Heading font stack.

up to 200 characters

bgstringoptional

Background of the email card, as hex.

canvasstringoptional

Background behind the card, as hex.

textstringoptional

Default text colour, as hex.

accentstringoptional

Brand colour for buttons and highlights, as hex.

linkstringoptional

Link colour, as hex.

widthstringoptional

Width of the email card on wide screens.

one of 560px, 600px, 680px

radiusstringoptional

Corner rounding of the email's card.

one of 0px, 6px, 12px, 16px, 24px, 999px

btnRadiusstringoptional

Button corners; radius rounds the email's card and, when this is unset, buttons.

one of 0px, 6px, 12px, 16px, 24px, 999px

btnstringoptional

Button style.

one of solid, outline

plainTextOverridestring | nulloptional

Plain text sent instead of the version generated from the blocks.

up to 512000 characters

statusstringrequired

Where the campaign is in its lifecycle.

one of draft, scheduled, sending, sent, cancelled

sendAtstring | nullrequired

When it is scheduled to send, if at all.

date-time

localSendAtstring | nullrequired

Set for a local-time send: the wall-clock time each contact receives it at.

archivedAtstring | nullrequired

When it was archived; archived campaigns are left out of the list by default.

date-time

revisionintegerrequired

Raised by every edit. Send it back as expectedRevision on the update so a change made since you read it is refused instead of overwritten.

min > 0 · max 2147483647

createdAtstringrequired

date-time

updatedAtstringrequired

date-time