Prerequisites
- An active Masivo account with at least one ACTIVE in-app template
- A SERVER or CLIENT API key
- Customers registered with
external_idvalues matching your app user ids - For real-time journey delivery: a registered FCM device token and push consent on the customer profile (same setup as push notifications). Without them, messages still materialize in Masivo but the app only sees them on the next
GET /inapp-messagesfetch (for example on app open).
Check capabilities
Before wiring the SDK, confirm in-app is enabled and read journey event types that support real-time refresh:inappEnabled is false, skip in-app fetch calls until templates are published.
Fetch eligible messages
Call this endpoint after app launch and whenever a trigger event fromeventTypes fires:
| Parameter | Description |
|---|---|
brand_id | Filter by brand |
trigger | Event type active on screen (returns untriggered or matching messages) |
types | Comma-separated types, for example modal,banner |
limit | Max messages (1–50, default 10) |
Render messages
Sort by priority
Messages are pre-sorted by Masivo, but you can re-sort using
display_rules.priority when showing multiple surfaces.Map type to UI
Render
modal, banner, slideup, or fullscreen using your design
system. Use content.buttons for actions.Log impression events
After displaying or interacting with a message, report the action:shown, clicked, dismissed.
For button clicks, include metadata:
{ "data": { "success": true } } and emits INAPP_SHOWN, INAPP_CLICKED, or INAPP_DISMISSED tracking events.
Common patterns
Refresh on app open
Refresh after a journey trigger event
Log shown before render
Always sendshown after the message is visible. Masivo assigns a tracking_id on shown and reuses it for subsequent clicked or dismissed events in the same impression.
Frequently asked questions
Do in-app messages require push notification permissions?
Do in-app messages require push notification permissions?
Displaying messages does not — your app fetches eligible messages over HTTPS and renders them in your UI.Real-time journey delivery does. When a journey materializes an in-app message, Masivo sends a silent push so the app refreshes its queue. That path requires:
- A registered FCM device token on the customer (
PATCH /customers/{id}/devices) - Push consent on the customer profile (
consent.purposes.push_notificationsnot disabled) - Firebase configured in Push settings
What happens when max_impressions is reached?
What happens when max_impressions is reached?
The message is excluded from
GET /inapp-messages results. A final shown event moves the row out of pending when the cap is hit.Can the same template show multiple times?
Can the same template show multiple times?
Yes, when
display_rules.max_impressions is greater than 1 and min_interval_seconds has elapsed since the last shown event.How do journey-triggered messages arrive in real time?
How do journey-triggered messages arrive in real time?
When a qualifying event is processed, Masivo materializes the in-app message and sends a silent push to devices with a valid FCM token and push consent. Your app handles that payload, then calls
GET /inapp-messages (optionally with the trigger query param from the push data). Check eventTypes from /inapp/capabilities for supported journey events.