Return an engagement summary
Changed onReturns your open and click rates for a date window, compared with the previous window of the same length, with the counts behind them. Use it to see whether engagement is going up or down.
The open rate is the share of messages with open tracking that were opened at least once. Treat it as a trend rather than an exact count: some mail clients and privacy features load images automatically, which counts as an open. Messages count on the day they were sent, so rates for recent days keep rising as recipients open them.
Request
- Base URLhttps://api.us.nylas.com
- AuthHTTP bearer
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Query parameters
The first day of the window, as a UTC date in YYYY-MM-DD format. Defaults to six days before end, so the default window covers 7 days. A window can cover up to 365 days.
The last day of the window, as a UTC date in YYYY-MM-DD format. Defaults to today. Today is included as a partial day.
Return only data for messages sent from this domain.
Response
Success. Returns the summary.
Example response
{
"data": {
"totals": {
"tracked_opens": 1200,
"tracked_links": 1200,
"opened": 384,
"clicked": 96,
"opens_total": 611,
"clicks_total": 142
},
"metrics": {
"open_rate": {
"value": 98.6,
"delta_pp": -0.8,
"prior_value": 99.4
},
"click_rate": {
"value": 98.6,
"delta_pp": -0.8,
"prior_value": 99.4
}
},
"prior_period": {
"start": "2026-10-24",
"end": "2026-10-30"
}
}
}Changes
- info
endpoint added
- info