Return engagement over time
Changed onReturns open and click counts and rates bucketed by day, week, or month. Use it to compare engagement across date ranges and to see how a campaign performed against earlier sends. A window can cover up to 365 days.
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.
The size of each time bucket. auto picks day for windows up to 21 days, week for windows up to 92 days, and month for longer windows. Weeks start on Monday.
Response
Success. Returns one bucket per period.
Example response
{
"data": {
"granularity": "day",
"buckets": [
{
"start": "2026-10-28",
"end": "2026-10-28",
"tracked_opens": 1200,
"tracked_links": 1200,
"opened": 384,
"clicked": 96,
"opens_total": 611,
"clicks_total": 142,
"open_rate": 32,
"click_rate": 8
}
]
}
}Changes
- info
endpoint added
- info