Return send metrics by domain or sender
Changed onReturns send counts and rates grouped by sending domain, sender address, or recipient domain. Use it to find which of your domains or Agent Accounts has the highest bounce rate, or which mailbox provider is rejecting your mail. Rows are sorted by sent volume 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. recipient_domain covers the last 90 days at most.
The sort order, as <key>:<asc|desc>. The key is one of key, sent, delivery_rate, bounce_rate, or complaint_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": "recipient_domain",
"window": {
"start": "2026-10-24",
"end": "2026-10-30"
},
"rows": [
{
"key": "example.org",
"sent": 412,
"delivered": 380,
"bounced_hard": 30,
"delivery_rate": 92.2,
"bounce_rate": 7.3
}
]
}
}Changes
- info
endpoint added
- info