In-App Messaging
In-App messaging delivers contextual notifications directly within your application’s UI. These messages appear while the user is actively using your app, making them ideal for onboarding, feature announcements, and contextual prompts.
When to use in-app messaging
Section titled “When to use in-app messaging”- Onboarding flows: guide new users through key features
- Feature announcements: highlight new functionality to active users
- Contextual prompts: show relevant messages based on user behaviour
- Surveys and feedback: collect responses without redirecting users externally
Sending an in-app message
Section titled “Sending an in-app message”curl -X POST https://api.smooven.io/v1/agent/notify \ -H "Authorization: Bearer YOUR_SECRET_KEY" \ -H "Content-Type: application/json" \ -d '{ "channel": "inapp", "to": "player_id_abc123", "inapp": { "type": "banner", "title": "New feature: Smart Routing", "body": "Your notifications now automatically pick the best delivery channel.", "action": { "text": "Learn More", "url": "/settings/routing" }, "dismissible": true, "expires_at": "2026-03-12T00:00:00Z" } }'Message types
Section titled “Message types”| Type | Description | Use case |
|---|---|---|
banner | Slim bar at top or bottom of screen | Feature announcements, system status |
modal | Centered overlay dialog | Important updates, onboarding steps |
card | Inline content card | Contextual prompts, recommendations |
toast | Brief popup notification | Quick confirmations, real-time updates |
Client SDK integration
Section titled “Client SDK integration”To display in-app messages, integrate the Smooven SDK into your application:
// Initialise the Smooven SDKimport { Smooven } from '@smooven/sdk';
const smooven = new Smooven({ appId: 'app_live_xyz789...', userId: 'user_123',});
// Listen for in-app messagessmooven.onInAppMessage((message) => { // The SDK handles rendering by default // Override for custom UI if needed console.log('Received:', message.title);});
// Initialise (fetches pending messages)smooven.init();Targeting and scheduling
Section titled “Targeting and scheduling”In-app messages can be targeted based on:
- User segments: new users, power users, specific cohorts
- Behaviour triggers: show after completing a specific action
- Time-based: schedule start and end dates
- Frequency caps: limit how often a user sees a specific message
Analytics
Section titled “Analytics”Track how users interact with in-app messages:
- Impressions: how many users saw the message
- Clicks: how many users tapped the action button
- Dismissals: how many users closed the message
- Conversion rate: clicks divided by impressions