Return engagement by domain or sender
Changed onReturns open and click counts and rates grouped by sending domain or sender address. Use it to compare engagement across your domains and Agent Accounts. Rows are sorted by the number of messages sent with open tracking by default.
Request
- Base URLhttps://api.us.nylas.com
- AuthHTTP bearer
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Query parameters
What to group by. agent_account groups by the sender email address.
The sort order, as <key>:<asc|desc>. The key is one of key, tracked_opens, tracked_links, open_rate, or click_rate.
The maximum number of rows to return. When there are more groups, the rest are combined into one final row with the key (others).
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 one row per group.
Example response
{
"data": {
"group_by": "agent_account",
"window": {
"start": "2026-10-24",
"end": "2026-10-30"
},
"rows": [
{
"key": "sales@mail.example.com",
"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