provider Categories GET /categories/stats
@utdk/sendgrid /categories/stats
Retrieve Email Statistics for Categories
**This endpoint allows you to retrieve all of your email statistics for each of your categories.** If you do not define any query parameters, this endpoint will return a sum for each category in groups of 10.
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
categories query required
The individual categories that you want to retrieve statistics for. You may include up to 10 different categories.
string
limit query
The number of results to include.
integer
offset query
The number of results to skip.
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)
Gateway
The gateway proxies requests and injects credentials server-side. Configure credentials above, then enter your gateway URL.

Saved automatically to browser storage.

getCategoriesStats
GET/categories/stats
**This endpoint allows you to retrieve all of your email statistics for each of your categories.** If you do not define any query parameters, this endpoint will return a sum for each category in groups of 10.

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.

required

The individual categories that you want to retrieve statistics for. You may include up to 10 different categories.

The number of results to include.

The number of results to skip.

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

Enter a gateway URL above to enable sending.

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

TypeScript

import sendgrid from '@utdk/sendgrid';

await sendgrid.getCategoriesStats({
  "limit": 500,
  "on-behalf-of": "The subuser's username. This header generates the API call as if the subuser account was making the call."
})