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
| Field | Type | Required |
|---|---|---|
title | string | FCM always; Web Push for visible notifications |
body | string | FCM always; Web Push for visible notifications |
data | Record<string, unknown> | no (required for Web Push silent / data-only) |
icon | string | no |
ttl | number | no |
messageId | string | no |
Web Push
| Field | Type | Required |
|---|---|---|
subscription | PushSubscription | yes |
urgency | "very-low" | "low" | "normal" | "high" | no — RFC 8030 header |
topic | string | no — 1–32 printable ASCII collapse key |
badge | string | no |
image | string | no |
tag | string | no |
actions | { action, title, icon? }[] | no |
requireInteraction | boolean | no |
renotify | boolean | no |
silent | boolean | no — 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
| Field | Type | Required |
|---|---|---|
token | string | yes |
title | string | yes |
body | string | yes |
image | string | no |
FCM stringifies non-string data values before send.
Result
| Field | Type | Notes |
|---|---|---|
messageId | string | Provider or client id |
status | string | e.g. "accepted" |
response | string | Often the HTTP status or FCM name |
provider | string? | "webpush" / "fcm"; set by fallback |
providerIndex | number? | Fallback chain index |
Map any channel result with channel send result.
Troubleshooting
No. Each call is either Web Push (subscription) or FCM (token). Match the shape to the transport.
No. FCM still requires title and body on this union. Use Web Push silent / data-only for background browser sync.
Learn more
- Push channel
- Web Push transport
- Stability policy — optional fields may grow in 1.x
- Channel send result