APNs and FCM Payloads Side by Side: A Practical Push Notification Guide
How APNs and FCM HTTP v1 payloads map to each other, what priority, collapse keys and silent pushes do, and how to stay under the 4 KB limit.

Sending a test push should take a minute. In practice it often means two documentation sites, a JSON file edited by hand and a rejected request with a terse error. Apple and Google describe the same idea, a short message with a title and a body, in very different shapes. This guide explains how the two formats map onto each other and how to use the Mobile Push Payload Builder to produce both from one form.
The two formats
Apple Push Notification service, APNs, takes a JSON body with an aps dictionary. The visible part lives in aps.alert with title, subtitle and body. Badge, sound, category and thread-id sit beside it. Anything outside aps is your own data. Delivery options are not in the JSON at all but in HTTP/2 headers: apns-push-type, apns-priority, apns-topic, apns-expiration and apns-collapse-id.
Firebase Cloud Messaging's HTTP v1 API wraps everything in a message object. The cross-platform notification block holds title, body and image, the data block holds string key-value pairs, and platform blocks named android and apns carry the specifics. The android block takes priority, ttl, collapse_key and a nested notification with channel_id, sound and tag.
The builder fills both at once. Type the title once and it lands in aps.alert and in message.notification.
Priority and delivery timing
High priority asks for immediate delivery and may wake the device. Normal priority lets the system batch messages to save battery. For APNs that means apns-priority 10 or 5; for Android it is HIGH or NORMAL. Use high priority only for messages the user expects right away, such as chat or a delivery driver arriving. Both platforms lower the priority of apps that send high-priority messages which the user never sees.
Silent pushes
A silent or background push carries no visible alert. On iOS it sets content-available to 1, must use push type background and must use priority 5. The app gets a short window to fetch data. iOS throttles these heavily, so they are useful for occasional syncs but not as a reliable real-time channel. The builder's silent template removes the alert fields and sets the headers correctly.
Collapse keys and expiry
If a phone is offline and you send three score updates, the user probably wants only the latest. A collapse key tells the service to keep only the newest undelivered message with that key. On APNs the collapse ID can be at most 64 bytes.
Time to live controls how long the service keeps trying. A flash sale that ends tonight should not arrive tomorrow. FCM keeps messages for at most 28 days.
The 4 KB limit
Regular payloads on both services are limited to 4096 bytes. The builder measures the exact UTF-8 size of each payload and shows a bar for each, which matters because emoji and non-Latin scripts take two to four bytes per character. If you are near the limit, send an ID in the data and let the app fetch the details.
Checks the builder runs
- Payloads over 4096 bytes.
- Collapse IDs over 64 bytes.
- FCM data keys that are reserved, such as from or names starting with google.
- Non-https image URLs, and a reminder that iOS needs a Notification Service Extension to show images.
- The critical interruption level, which needs an Apple-approved entitlement.
- Empty visible notifications.
Using the output
The output tabs give the APNs JSON and headers, the complete FCM request body and cURL commands for the APNs sandbox or production gateway and for the FCM endpoint. The commands expect your own token in an environment variable. Nothing is sent from the page, and no key is ever requested. The phone previews give a quick sense of how much text fits, though real devices truncate based on font size and screen width.
A sensible test routine
- Start from the closest template.
- Write the real copy and watch the preview length.
- Set priority, collapse key and expiry deliberately.
- Fix every warning.
- Send to a sandbox device first, then to production.
Limits
The builder covers standard alert and background notifications. Web push, VoIP pushes, Live Activities and other push services are out of scope.



