Tracking events
Return a message's opens and clicks
Changed onReturns engagement for one message: how many times it was opened, when it was first and last opened, and how many clicks each link got. Opens and clicks are counted per message, not per recipient. Covers messages sent in the last 90 days.
get/v3/activity/tracking/messages/{message_id}
Request
- Base URLhttps://api.us.nylas.com
- AuthHTTP bearer
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Response
Success. Returns the message's opens and clicks.
Example response
{
"data": {
"message_id": "7e15afb2-ba2b-4f3b-b72d-cbbf04921fc1",
"thread_id": "b6b9461a-1ebd-4fb6-9cae-df7dc1f31baa",
"grant_id": "0b7e5a6b-0cbd-4a39-b3ba-2b53b1b0a7d6",
"from": "support@mail.example.com",
"sending_domain": "mail.example.com",
"label": "october-newsletter",
"tracking": {
"opens": true,
"links": true
},
"opens": {
"total": 3,
"first_at": 1792782317,
"last_at": 1792782415
},
"clicks": {
"total": 3,
"first_at": 1792782323,
"last_at": 1792782330,
"links": [
{
"url": "https://www.example.com/pricing",
"clicks": 2
}
]
},
"events": [
{
"id": "8356870f694b3f673e8780f2d5d09409e97776fa0429acc83c9fb5b8bba5b43c",
"event_type": "link_clicked",
"timestamp": 1792782330,
"url": "https://www.example.com/pricing",
"link_index": 1,
"ip": "198.51.100.24",
"user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7)"
}
]
}
}Changes
- info
endpoint added
- info