# message.link_clicked

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

Sent when a participant clicks a link in a tracked message.

## 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 containing the clicked link.
- `label` (string) - The tracking label you assigned when sending the message.
- `link_data` (array) - Aggregate click data per tracked link.
  - `count` (integer) - Total number of times this link was clicked.
  - `url` (string) - The URL that was clicked.
- `recents` (array) - Recent click events with client details.
  - `click_id` (integer) - Sequential click event ID.
  - `ip` (string) - IP address of the clicker.
  - `link_index` (string) - Index of the clicked link in the message.
  - `timestamp` (integer) - Unix timestamp of this click event.
  - `user_agent` (string) - User-Agent string of the clicker's client.
- `sender_app_id` (string) - The Nylas application ID that sent the tracked message.
- `timestamp` (integer) - Unix timestamp of the click event.

## Example payload

```json
{
  "specversion": "1.0",
  "type": "message.link_clicked",
  "source": "/com/nylas/tracking",
  "id": "<WEBHOOK_ID>",
  "time": 1695480423,
  "data": {
    "application_id": "<NYLAS_APPLICATION_ID>",
    "grant_id": "<NYLAS_GRANT_ID>",
    "object": {
      "object": "message",
      "grant_id": "<NYLAS_GRANT_ID>",
      "link_data": [
        {
          "count": 1,
          "url": "https://www.example.com"
        }
      ],
      "message_id": "18ac281f237c934b",
      "label": "Hey, just testing",
      "recents": [
        {
          "click_id": 0,
          "ip": "<IP ADDR>",
          "link_index": "0",
          "timestamp": 1695480422,
          "user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/117.0.0.0 Safari/537.36"
        },
        {
          "click_id": 1,
          "ip": "<IP ADDR>",
          "link_index": "0",
          "timestamp": 1695480422,
          "user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/117.0.0.0 Safari/537.36"
        },
        {
          "click_id": 2,
          "ip": "<IP ADDR>",
          "link_index": "0",
          "timestamp": 1695480422,
          "user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/117.0.0.0 Safari/537.36"
        }
      ],
      "sender_app_id": "<app id>",
      "timestamp": 1695480422
    }
  },
  "webhook_delivery_attempt": 1
}
```
