Content

Push Notification JSON Example

Push notification JSON payload example for FCM (Firebase Cloud Messaging), APNs, and Web Push. Includes title, body, deep-link data, and action buttons.

{
  "id": "notif_4Mn8pL2qZ6",
  "to": "usr_7Kx9mP2nQ4",
  "channel": "order_updates",
  "notification": {
    "title": "Your order is out for delivery!",
    "body": "Order #ORD-20250524-7823 will arrive today by 6 PM.",
    "imageUrl": "https://cdn.example.com/icons/delivery-truck.png",
    "sound": "default",
    "badge": 1
  },
  "data": {
    "type": "order_status",
    "orderId": "ORD-20250524-7823",
    "status": "out_for_delivery",
    "deepLink": "myapp://orders/ORD-20250524-7823"
  },
  "actions": [
    {
      "id": "track",
      "label": "Track Order",
      "deepLink": "myapp://orders/ORD-20250524-7823/track"
    },
    {
      "id": "support",
      "label": "Get Help",
      "deepLink": "myapp://support"
    }
  ],
  "scheduling": {
    "deliverAt": null,
    "ttlSeconds": 86400,
    "priority": "high"
  },
  "platform": [
    "android",
    "ios",
    "web"
  ],
  "sentAt": "2025-05-24T12:00:00Z"
}

Field Reference

notification.titlestringrequiredNotification title shown in bold. Keep under 50 characters for full visibility on all devices.
notification.bodystringrequiredNotification message body. Keep under 100 characters — longer text is truncated on most devices.
dataobjectoptionalCustom payload delivered to the app handler. Not shown in the notification UI. Used for deep linking and triggering data refreshes.
data.deepLinkstringoptionalApp deep-link URL opened when the user taps the notification.
scheduling.ttlSecondsintegeroptionalHow long the notification is valid. Dropped if undelivered after TTL (device offline).
scheduling.prioritystringoptionalDelivery priority: high wakes the device immediately; normal waits for the next opportunity.

Variants

FCM FormatFirebase Cloud Messaging payload for Android and web.
FCM Format
{
  "to": "FCM_DEVICE_TOKEN",
  "notification": {
    "title": "Order delivered!",
    "body": "Your order has been delivered."
  },
  "data": {
    "orderId": "ORD-20250524-7823",
    "type": "order_delivered"
  },
  "android": {
    "priority": "high",
    "notification": {
      "sound": "default",
      "channel_id": "order_updates"
    }
  }
}
Web PushWeb Push API payload for browser notifications.
Web Push
{
  "title": "New message from Priya",
  "body": "Hey! Did you see the latest API update?",
  "icon": "/icons/icon-192.png",
  "badge": "/icons/badge-72.png",
  "data": {
    "url": "https://app.example.com/messages/1234"
  },
  "actions": [
    {
      "action": "reply",
      "title": "Reply"
    },
    {
      "action": "dismiss",
      "title": "Dismiss"
    }
  ]
}

Common Use Cases

  • FCM/APNs push notification API payload for order and delivery updates
  • In-app notification centre item data model
  • Multi-channel notification service (push + email + SMS) abstraction layer
push notificationFCMAPNsmobileweb push

Validate or format this JSON

Paste the example above into JSONKit's tools to validate, minify, or explore the structure interactively.

Frequently Asked Questions

notification fields (title, body) are rendered automatically by the OS when the app is in the background. data is silently delivered to your app handler without displaying anything. For fully custom notification UI, use data only and handle display in your app code.

Urgent transactional alerts (order shipped): 1-4 hours. Promotional content: 24 hours. Chat messages: 24-48 hours. Set TTL to 0 for time-sensitive events that are useless if delayed — live auction bids, real-time sports scores.

Request permission only after a user action — never on first page load. Always explain the value before asking. If permission is denied, do not ask again immediately; show an in-app prompt linking to browser settings when the user indicates interest.

Related JSON Examples