MessagePayload interface

Message payload that contains the notification payload that is represented withNotificationPayload and the data payload that contains an arbitrary number of key-value pairs sent by developers through theSend API.

Signature:

exportinterfaceMessagePayload

Properties

PropertyTypeDescription
collapseKeystringThe collapse key of the message. SeeNon-collapsible and collapsible messages
data{ [key: string]: string; }Arbitrary key/value payload.
fcmOptionsFcmOptionsOptions for features provided by the FCM SDK for Web. SeeWebpushFcmOptions.
fromstringThe sender of this message.
messageIdstringThe message ID of a message.
notificationNotificationPayloadDisplay notification details. Details are sent through theSend API.

MessagePayload.collapseKey

The collapse key of the message. SeeNon-collapsible and collapsible messages

Signature:

collapseKey:string;

MessagePayload.data

Arbitrary key/value payload.

Signature:

data?:{[key:string]:string;};

MessagePayload.fcmOptions

Options for features provided by the FCM SDK for Web. SeeWebpushFcmOptions.

Signature:

fcmOptions?:FcmOptions;

MessagePayload.from

The sender of this message.

Signature:

from:string;

MessagePayload.messageId

The message ID of a message.

Signature:

messageId:string;

MessagePayload.notification

Display notification details. Details are sent through theSend API.

Signature:

notification?:NotificationPayload;

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025-10-09 UTC.