Project: /docs/reference/js/_project.yaml
Book: /docs/reference/_book.yaml
page_type: reference
{% comment %}
DO NOT EDIT THIS FILE!
This is generated by the JS SDK team, and any local changes will be
overwritten. Changes should be made in the source code at
https://github.com/firebase/firebase-js-sdk
{% endcomment %}
# MessagePayload interface
Message payload that contains the notification payload that is represented with [NotificationPayload](./messaging.notificationpayload.md#notificationpayload_interface) and the data payload that contains an arbitrary number of key-value pairs sent by developers through the [Send API](https://firebase.google.com/docs/reference/fcm/rest/v1/projects.messages#notification).
Signature:
```typescript
export interface MessagePayload
```
## Properties
| Property | Type | Description |
| --- | --- | --- |
| [collapseKey](./messaging.messagepayload.md#messagepayloadcollapsekey) | string | The collapse key of the message. See [Non-collapsible and collapsible messages](https://firebase.google.com/docs/cloud-messaging/concept-options#collapsible_and_non-collapsible_messages) |
| [data](./messaging.messagepayload.md#messagepayloaddata) | { \[key: string\]: string; } | Arbitrary key/value payload. |
| [fcmOptions](./messaging.messagepayload.md#messagepayloadfcmoptions) | [FcmOptions](./messaging.fcmoptions.md#fcmoptions_interface) | Options for features provided by the FCM SDK for Web. See [WebpushFcmOptions](https://firebase.google.com/docs/reference/fcm/rest/v1/projects.messages#webpushfcmoptions). |
| [from](./messaging.messagepayload.md#messagepayloadfrom) | string | The sender of this message. |
| [messageId](./messaging.messagepayload.md#messagepayloadmessageid) | string | The message ID of a message. |
| [notification](./messaging.messagepayload.md#messagepayloadnotification) | [NotificationPayload](./messaging.notificationpayload.md#notificationpayload_interface) | Display notification details. Details are sent through the [Send API](https://firebase.google.com/docs/reference/fcm/rest/v1/projects.messages#notification). |
## MessagePayload.collapseKey
The collapse key of the message. See [Non-collapsible and collapsible messages](https://firebase.google.com/docs/cloud-messaging/concept-options#collapsible_and_non-collapsible_messages)
Signature:
```typescript
collapseKey: string;
```
## MessagePayload.data
Arbitrary key/value payload.
Signature:
```typescript
data?: {
[key: string]: string;
};
```
## MessagePayload.fcmOptions
Options for features provided by the FCM SDK for Web. See [WebpushFcmOptions](https://firebase.google.com/docs/reference/fcm/rest/v1/projects.messages#webpushfcmoptions).
Signature:
```typescript
fcmOptions?: FcmOptions;
```
## MessagePayload.from
The sender of this message.
Signature:
```typescript
from: string;
```
## MessagePayload.messageId
The message ID of a message.
Signature:
```typescript
messageId: string;
```
## MessagePayload.notification
Display notification details. Details are sent through the [Send API](https://firebase.google.com/docs/reference/fcm/rest/v1/projects.messages#notification).
Signature:
```typescript
notification?: NotificationPayload;
```