In-app messages
Show force and recommended updates, What's New, announcements, chats, posts and your changelog inside your app.
AAgent44Updated 4 min read
On this page
In one minute#
Everything you create in Engagement that's meant for inside your app reaches it through the API:
In the dashboard | What the app shows |
|---|---|
Force update | A blocking screen until the user updates. |
Recommended update | A dismissible sheet asking them to update. |
Changelog update with "Show in the app after updating" | What's New, right after the user updates past that version. |
Modal, banner | An announcement: a centred card, a bottom sheet or a strip at the top. |
Chat | A message from a teammate, with a reply box. |
Post | News, as cards on your support home. |
Changelog | A "What's new" list or screen. |
Messages and posts can be aimed at some of your apps, platforms and an app version range, and can have a start and end time; changelog updates can be aimed at platforms and versions. The API only returns what applies to the app (from its key), the platform and the version you send. On websites, the web messenger already shows chats, announcements, posts and the changelog.
At every launch#
Ask for the messages to show now:
GET /v1/prompts?app_version=4.2.0&previous_version=4.1.0&os_version=17.4.1app_versionis the running version. Without it, update prompts and What's New are never returned.os_versionis the device's system version (17.4.1on iOS) and, on Android,os_api_levelits API level (34). Both are optional. An update can have a minimum system (the new build's deployment target or minSdkVersion), and a device below it isn't shown the update, since the store won't offer it: a force update would otherwise lock that user out. Without them, updates show as before.previous_versionis the version the device ran at its previous launch: store it after each launch and send it next time. Leave it out on a fresh install. What's New shows only when the user has just updated past its changelog update's version.Send the user's identity headers, so a message set to show once stays shown once across devices, and so a message limited to an audience segment (a saved filter from Users) reaches the people in it. A device we haven't seen yet matches no segment. Force updates are never limited to a segment.
The answer lists prompts sorted by importance: force update, recommended update, What's New, modal announcements, chats, then banners. Show the first one only, one per launch.
How to show each kind#
| How to show it |
|---|---|
| Full screen and blocking: no close button, no back gesture. The only button opens |
| In its |
| In its |
|
|
| Like an incoming chat bubble from |
Buttons:
primary.actionisdismiss(close it),open_store(openstore_url),url(openprimary.url, alwayshttps) oropen_changelog(openentry.url, or showentry.doc).secondary, when present, is a quieter button that closes the prompt.image_url, when present, is a wide image above the title.
Render title and body as plain text (they may contain line breaks), never as HTML or Markdown.
Report what happened#
POST /v1/prompts/{id}/events
{ "type": "shown" }Send shown when it appears, clicked for the primary button and dismissed for the secondary button, close or swipe. This drives each message's frequency (once, until_clicked, every_launch) and the stats your team sees. Never block the UI on it. Report events, and chat replies, with the same key and identity headers that fetched the message: a message limited to an audience segment answers 404 for anyone outside it, as does one meant for another app.
Without identity headers nothing is stored, so keep seen state on the device yourself, by prompt id: once means never again after it was shown, until_clicked means again on later launches until the primary button is tapped, every_launch means always.
Posts and the changelog#
GET /v1/postslists published posts, newest first (at most 20). Show them as cards that open the full post. A post withdisplay: "full"should open in full by itself once: remember the ids you've opened on the device, and reportshown.GET /v1/changeloglists your changelog updates, newest first, ten at a time (up to 30 withlimit); page withbeforeset tonext_before. Each entry haslabels(new,improved,fixed) and adoc.
Showing doc content#
Posts, changelog entries, What's New and help articles carry their content as doc: JSON in the same structure as the help center editor's, with blocks for other platforms and versions already removed. Images inside it have paths that start with media_prefix; replace that with media_base to load them.
Every request and response is in the Engagement API.