# message.opened

Source: https://developer.nylas.com/docs/reference/notifications/message-tracking/message-opened/

Sent when a participant opens a tracked message.

> If your grant is expired, you'll still receive `message.opened` notifications. If deleted, notifications stop.
If open link was loaded multiple times within one minute, only the first open will be counted.

## data.object fields

- `object` (string) (message) - Always `message`.
- `grant_id` (string) - The grant ID that owns the tracked message.
- `message_id` (string) **(required)** - The ID of the tracked message that was opened.
- `label` (string) - The tracking label you assigned when sending the message.
- `message_data` (object) - Aggregate open data.
  - `count` (integer) - Total number of times the message has been opened.
  - `timestamp` (integer) - Unix timestamp of the most recent open event.
- `recents` (array) - Recent open events with client details.
  - `ip` (string) - IP address of the opener.
  - `opened_id` (integer) - Sequential open event ID.
  - `timestamp` (integer) - Unix timestamp of this open event.
  - `user_agent` (string) - User-Agent string of the opener's client.
- `sender_app_id` (string) - The Nylas application ID that sent the tracked message.
- `timestamp` (integer) - Unix timestamp of the most recent open event.

## Example payload

```json
{
  "specversion": "1.0",
  "type": "message.opened",
  "source": "/com/nylas/tracking",
  "id": "<WEBHOOK_ID>",
  "time": 1695480567,
  "data": {
    "application_id": "<NYLAS_APPLICATION_ID>",
    "grant_id": "<NYLAS_GRANT_ID>",
    "object": {
      "object": "message",
      "grant_id": "<NYLAS_GRANT_ID>",
      "message_data": {
        "count": 1,
        "timestamp": 1695480410
      },
      "message_id": "18ac281f237c934b",
      "label": "Testing Nylas Messaged Opened Tracking",
      "recents": [
        {
          "ip": "<IP ADDR>",
          "opened_id": 0,
          "timestamp": 1695480567,
          "user_agent": "Mozilla/5.0"
        },
        {
          "ip": "<IP ADDR>",
          "opened_id": 1,
          "timestamp": 1695480567,
          "user_agent": "Mozilla/5.0"
        },
        {
          "ip": "<IP ADDR>",
          "opened_id": 2,
          "timestamp": 1695480567,
          "user_agent": "Mozilla/5.0"
        }
      ],
      "sender_app_id": "<app id>",
      "timestamp": 1695480410
    }
  },
  "webhook_delivery_attempt": 1
}
```
