Reference

Push options

Fields accepted by `PushSender.send` for Web Push and FCM.

PushOptions is WebPushOptions | FcmPushOptions. Pick the shape that matches your transport.

The one rule

Pass subscription to WebPushTransport and token to FcmTransport.

Shared fields

FieldTypeRequired
titlestringFCM always; Web Push for visible notifications
bodystringFCM always; Web Push for visible notifications
dataRecord<string, unknown>no (required for Web Push silent / data-only)
iconstringno
ttlnumberno
messageIdstringno

Web Push

FieldTypeRequired
subscriptionPushSubscriptionyes
urgency"very-low" | "low" | "normal" | "high"no — RFC 8030 header
topicstringno — 1–32 printable ASCII collapse key
badgestringno
imagestringno
tagstringno
actions{ action, title, icon? }[]no
requireInteractionbooleanno
renotifybooleanno
silentbooleanno — encrypt only data

A subscription contains endpoint, keys.p256dh, and keys.auth.

Omit title / body and pass data for a data-only Web Push (or set silent: true).

FCM

FieldTypeRequired
tokenstringyes
titlestringyes
bodystringyes
imagestringno

FCM stringifies non-string data values before send.

Result

FieldTypeNotes
messageIdstringProvider or client id
statusstringe.g. "accepted"
responsestringOften the HTTP status or FCM name
providerstring?"webpush" / "fcm"; set by fallback
providerIndexnumber?Fallback chain index

Map any channel result with channel send result.

Troubleshooting

Learn more

Next

On this page