Return send metrics over time
Changed onReturns sent, delivered, bounced, and complaint counts with bounce and complaint rates, bucketed by day, week, or month. Use it to chart how your sending changes over a date range and to spot the day a problem started. 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",
"sent": 1840,
"delivered": 1814,
"bounced_hard": 18,
"bounced_soft": 6,
"complaints": 1,
"bounce_rate": 0.9
}
]
}
}Changes
- info
endpoint added
- info