configure_inapp_banner
Configure and publish an on-site In-App Popup or Banner (center modal, top sticky bar, or bottom slide-in toast) rendered inside the website by the PushNotif SDK without requiring browser push permission. Use this tool for visual in-page promos and announcements; do not use it for OS lock-screen notifications (use send_push_notification instead). Prerequisite: call list_apps first to obtain app_id. Requires PUSHNOTIF_API_KEY; saving configuration is idempotent and costs 0 credits, while each live visitor display deducts 1 credit (inapp_trigger controls when the banner fires—such as 'scroll_50' for 50% page scroll or 'event:add_to_cart' for custom DOM events—combined with inapp_freq to cap repeat impressions per visitor). Returns JSON { ok, app_id, inapp_enabled, inapp_style, inapp_trigger, inapp_freq }.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| app_id | Yes | Target application ID in format app_xxxx (obtain from list_apps) | |
| inapp_body | Yes | Banner supporting message text (1 to 240 characters) | |
| inapp_freq | No | Per-visitor frequency cap: 'once_forever' (one-time announcement per visitor, never shown again), 'once_per_session' (default), 'once_per_day', 'cooldown_3h', 'cooldown_12h', 'once_per_week', or 'always' | |
| inapp_style | No | Visual layout: 'modal' (center dialog), 'top_bar' (sticky top ribbon), or 'bottom_slide' (corner slide-in toast) | |
| inapp_title | Yes | Banner headline text (1 to 100 characters) | |
| segment_tag | No | Optional target segment/merchant tag (e.g., 'seblak-nearby') to display a dedicated In-App Banner on pages matching that tag under a single shared App ID (default: 'all' for global fallback) | |
| inapp_accent | No | Optional 6-digit hex color code for the CTA button and accent border (default: '#0058BE') | |
| inapp_cta_url | No | Optional HTTPS destination URL opened when the CTA button is clicked | |
| inapp_enabled | No | Set true to publish the banner live on the website, or false to pause it (default: true) | |
| inapp_trigger | No | Trigger condition: 'immediate' (default), 'delay_5s', 'delay_10s', 'scroll_50', 'scroll_80', or custom DOM event 'event:<name>' | |
| inapp_cta_text | No | Optional CTA button label (must be paired with inapp_cta_url to render a clickable action button) | |
| inapp_image_url | No | Optional HTTPS image/poster URL (supports transparent PNG/WEBP) | |
| inapp_image_size | No | Optional poster width preset when using image_only: 'compact', 'standard' (default), 'large', 'xl', or 'full' | |
| inapp_custom_html | No | Optional raw HTML card markup when inapp_template_id is ai_custom (renders up to 96vw x 94vh) | |
| inapp_template_id | No | Optional template preset: 'default', 'ai_custom' (custom HTML card), 'voucher_copy', 'flash_timer', 'feature_grid', or 'event_invite' | |
| inapp_image_transparent | No | Set true when using a transparent PNG/WEBP poster in image_only style so no card box is rendered |