PushizoDocs
Channels

In-app messages

In-app messages — block-based modal/banner/fullscreen layouts, triggers, audience, frequency, actions, A/B variants, SDK contract and public API.

In-app messages are rendered by the SDK with native components while the app is open; they do not require push permission. A message is made of blocks (image, title, body, button); to use raw HTML, see HTML in-app. Dashboard: Messages → In-App (editing requires campaigns.create, publishing campaigns.send).

Definition

{
  "name": "Sepet hatırlatma",
  "triggers": [{ "kind": "event", "name": "cart_viewed" }],
  "display": {
    "layout": "modal",
    "background_color": "#ffffff",
    "text_color": "#18181b",
    "dismissible": true,
    "blocks": [
      { "type": "image", "url": "https://cdn.pushizo.com/sale.png" },
      { "type": "title", "text": { "tr": "Merhaba {{ user.tags.name }}", "en": "Hi {{ user.tags.name }}" } },
      { "type": "body", "text": { "tr": "Sepetin seni bekliyor", "en": "Your cart is waiting" } },
      { "type": "button", "id": "go", "text": { "tr": "Sepete git", "en": "Open cart" }, "action": { "type": "deeplink", "url": "myapp://cart" } }
    ]
  },
  "audience": { "included_segments": ["seg_…"], "excluded_segments": [] },
  "frequency": { "max_impressions": 3, "min_interval_seconds": 86400, "stop_after_interaction": true },
  "priority": 10,
  "start_at": null,
  "end_at": null
}
SectionValues
display.layoutmodal, banner_top, banner_bottom, fullscreen; auto_dismiss_seconds for banners
triggers (all must match)session_start; event (name); screen (name); trigger (key, op: eq|neq|exists|gt|lt, value) — compared against values set with the SDK's InAppMessages.addTrigger(key, value); trigger groups and a session duration condition
Actionsdismiss, url (browser), deeplink (app scheme), tags (writes tags to the user)
audienceSegment include/exclude; devices without push permission are included too
frequencyTotal impressions per user (per device when unidentified), time between two impressions, stop after interaction; default max_impressions: 1
variantsA/B variants and holdout; pick the winner with POST …/in-app-messages/{id}/winner (A/B testing)

Statistics: impressions, clicks (button_id), dismissals, unique users, CTR; webhook events in_app.impression, in_app.clicked, in_app.dismissed.

SDK behavior

  • At session start and at most every 5 minutes, the list is refreshed with GET /sdk/v1/apps/{app_id}/in-app?subscription_id=; text comes as plain strings already resolved to the user's language and personalized with Liquid.
  • Only one message is shown at a time (the one with the highest priority); impression is reported on display, click on a button, dismiss on close (POST /sdk/v1/apps/{app_id}/in-app/{message_id}/events).
  • remaining_impressions and min_interval_seconds are also enforced on the device; a message past its end_at is not shown.
  • Click listener: Web Pushizo.InAppMessages.addClickListener, with an equivalent API on iOS/Android/Flutter/bridges (SDK guides).

Public API

GET|POST /v1/apps/{app_id}/in-app-messages, GET|PATCH|DELETE …/{id}, POST …/{id}/status (draft → active → paused/archived), POST …/{id}/winner. Reading requires analytics:read, writing admin. All fields: API → In-app messages.

Personal data

When a user is deleted, their impression records are deleted; "Clear data" removes impressions but keeps the message definitions. Impression records are subject to the event retention period.

On this page