provider Subuser Statistics GET
/subusers/stats/monthly @utdk/sendgrid
/subusers/stats/monthly Retrieve monthly stats for all subusers
**This endpoint allows you to retrieve the monthly email statistics for all subusers over the given date range.**
When using the `sort_by_metric` to sort your stats by a specific metric, you can not sort by the following metrics:
`bounce_drops`, `deferred`, `invalid_emails`, `processed`, `spam_report_drops`, `spam_reports`, or `unsubscribe_drops`.
- date query required
- The date of the month to retrieve statistics for. Must be formatted YYYY-MM-DD
- string
- subuser query
- A substring search of your subusers.
- string
- sort_by_metric query
- The metric that you want to sort by. Metrics that you can sort by are: `blocks`, `bounces`, `clicks`, `delivered`, `opens`, `requests`, `unique_clicks`, `unique_opens`, and `unsubscribes`.'
- enum: blocks, bounces, clicks, delivered…
- sort_by_direction query
- The direction you want to sort.
- enum: desc, asc
- limit query
- Optional field to limit the number of results returned.
- integer
- offset query
- Optional beginning point in the list to retrieve from.
- integer
Try it
Authentication
Configure credentials for Email Activity (beta)
Gateway
The gateway proxies requests and injects credentials server-side. Configure credentials above, then enter your gateway URL.
Saved automatically to browser storage.
Code snippet
Updates live as you fill in the form above.
TypeScript
import sendgrid from '@utdk/sendgrid';
await sendgrid.getSubusersStatsMonthly({
"sort_by_metric": "delivered",
"sort_by_direction": "desc",
"limit": 5,
"offset": 0
})