provider Categories GET /categories/stats/sums
@utdk/sendgrid /categories/stats/sums
Retrieve sums of email stats for each category [Needs: Stats object defined, has category ID?]
**This endpoint allows you to retrieve the total sum of each email statistic for every category over the given date range.** If you do not define any query parameters, this endpoint will return a sum for each category in groups of 10.
sort_by_metric query
The metric that you want to sort by. Must be a single metric.
string
sort_by_direction query
The direction you want to sort.
enum: desc, asc
start_date query required
The starting date of the statistics to retrieve. Must follow format YYYY-MM-DD.
string
end_date query
The end date of the statistics to retrieve. Defaults to today. Must follow format YYYY-MM-DD.
string
limit query
Limits the number of results returned.
integer
offset query
The point in the list to begin retrieving results.
integer
aggregated_by query
How to group the statistics. Must be either "day", "week", or "month".
enum: day, week, month
on-behalf-of header
string

Try it

Authentication
Configure credentials for Email Activity (beta)
getCategoriesStatsSums
GET/categories/stats/sums
**This endpoint allows you to retrieve the total sum of each email statistic for every category over the given date range.** If you do not define any query parameters, this endpoint will return a sum for each category in groups of 10.

The metric that you want to sort by. Must be a single metric.

The direction you want to sort.

required

The starting date of the statistics to retrieve. Must follow format YYYY-MM-DD.

The end date of the statistics to retrieve. Defaults to today. Must follow format YYYY-MM-DD.

Limits the number of results returned.

The point in the list to begin retrieving results.

How to group the statistics. Must be either "day", "week", or "month".

Configure credentials above to enable sending.

Code snippet
Updates live as you fill in the form above.

TypeScript

import sendgrid from '@utdk/sendgrid';

await sendgrid.getCategoriesStatsSums({
  "sort_by_metric": "delivered",
  "sort_by_direction": "desc",
  "limit": 5,
  "offset": 0,
  "on-behalf-of": "The subuser's username. This header generates the API call as if the subuser account was making the call."
})