Skip to main content
POST
Create an In-App Campaign
Creates an in-app campaign draft: one in-app message or content card for an audience. You can set the message, priority, end time and audience now or later with Update an In-App Campaign, then launch it with Launch an In-App Campaign. Requires the campaigns:write scope.

Request

string
default:"Untitled in-app campaign"
Campaign name, up to 255 characters.
object
The message, with the same fields as an in-app sequence step: kind (message or card), format (modal, banner, fullscreen or html), position, eyebrow, title, body, imageUrl, imagePlacement, buttons (up to two, each with label, action and url), data, style, pinned, expiresAfterDays, html and showCloseButton. Merge tags such as {{firstName}} are filled for each contact when their app receives it. expiresAfterDays limits how long a contact keeps it after receiving it; without it, the item stays until the campaign ends or the contact dismisses it.
string
default:"medium"
low, medium or high. Apps show one message at a time; when several are waiting, higher priority comes first. Sequence messages count as medium.
string | null
ISO 8601 time the campaign ends. After it, nobody new gets the campaign and it leaves every feed that still has it, including cards contacts have seen but not dismissed. null means it runs until stopped.
object
Audience, the same shape as campaign targetLists: {"type":"all"}, {"type":"lists","listIds":[...]}, {"type":"segment","segmentId":"..."} or {"type":"rules","include":[...],"exclude":[...]}. Email status doesn’t matter. Each contact is checked when their app fetches its feed while the campaign is live.

Responses