Skip to content

Push Notifications

Push notifications provide free, instant delivery to users who have your mobile or web app installed. They support rich content, deep links, and interactive actions.

  • In-app engagement: activity updates, social notifications, content recommendations
  • Cost-sensitive messaging at scale: push is free regardless of volume
  • Rich notifications: images, action buttons, and deep links into specific app screens
  • Re-engagement: bring users back to your app with timely, relevant alerts
Terminal window
curl -X POST https://api.smooven.io/v1/agent/notify \
-H "Authorization: Bearer YOUR_SECRET_KEY" \
-H "Content-Type: application/json" \
-d '{
"channel": "push",
"to": "player_id_abc123",
"push": {
"title": "New message from Sarah",
"body": "Hey, are we still on for lunch tomorrow?",
"icon": "https://example.com/sarah-avatar.png",
"deep_link": "/conversations/sarah",
"actions": [
{ "id": "reply", "title": "Reply" },
{ "id": "dismiss", "title": "Dismiss" }
]
}
}'
PlatformServiceToken format
AndroidFirebase Cloud Messaging (FCM)FCM registration token
iOSApple Push Notification service (APNs)Device token (hex string)
WebWeb Push (VAPID)Push subscription JSON

Before sending push notifications, register the user’s device token with Smooven:

// Client-side: register a push token
await fetch('https://api.smooven.io/v1/players/register', {
method: 'POST',
headers: {
'X-App-ID': 'app_live_xyz789...',
'Content-Type': 'application/json',
},
body: JSON.stringify({
external_id: 'user_123',
channels: {
push: {
platform: 'android',
device_token: 'fcm_registration_token_here',
},
},
}),
});
ParameterTypeDescription
titlestringNotification title
bodystringNotification body text
iconstringURL to notification icon
imagestringURL to large image (Android, Web)
deep_linkstringApp deep link or URL to open on tap
badgenumberApp badge count (iOS)
soundstringNotification sound (default or custom)
ttlnumberTime-to-live in seconds (how long to retry)
actionsarrayAction buttons with id and title
dataobjectCustom key-value pairs passed to your app

Push notifications are best-effort delivery. Unlike SMS, there is no carrier-level guarantee. If the device is offline, notifications are queued by FCM/APNs and delivered when the device reconnects (subject to TTL).

  • Android: notifications delivered even if the app is not running
  • iOS: delivery depends on user permission and notification settings
  • Web: requires the browser to be running (not necessarily in the foreground)
  1. Respect user preferences. Only send relevant, timely notifications.
  2. Use action buttons to give users quick response options.
  3. Set appropriate TTL values. A flash sale notification is not useful 24 hours later.
  4. Track engagement. Monitor open rates and adjust frequency accordingly.
  5. Use Smart Routing to fall back to SMS or email for critical messages if push fails.