provider Marketing Campaigns Stats GET
/marketing/stats/singlesends/{id} @utdk/sendgrid
/marketing/stats/singlesends/{id} Get Single Send Stats by ID
**This endpoint allows you to retrieve stats for an individual Single Send using a Single Send ID.**
Multiple Single Send IDs can be retrieved using the "Get All Single Sends Stats" endpoint. Once you have an ID, this endpoint will return detailed stats for the Single Send specified.
You may constrain the stats returned using the `start_date` and `end_date` query string parameters. You can also use the `group_by` and `aggregated_by` query string parameters to further refine the stats returned.
- id path required
- string
- aggregated_by query
- Dictates how the stats are time-sliced. Currently, `"total"` and `"day"` are supported.
- enum: day, total
- start_date query
- Format: `YYYY-MM-DD`. If this parameter is included, the stats' start date is included in the search.
- string
- end_date query
- Format: `YYYY-MM-DD`.If this parameter is included, the stats' end date is included in the search.
- string
- timezone query
- [IANA Area/Region](https://en.wikipedia.org/wiki/Tz_database#Names_of_time_zones) string representing the timezone in which the stats are to be presented, e.g., "America/Chicago".
- string
- page_size query
- The number of elements you want returned on each page.
- integer
- page_token query
- The stats endpoints are paginated. To get the next page, call the passed `_metadata.next` URL. If `_metadata.prev` doesn't exist, you're at the first page. Similarly, if `_metadata.next` is not present, you're at the last page.
- string
- group_by query
- A/B Single Sends have multiple variation IDs and phase IDs. Including these additional fields allows further granularity of stats by these fields.
- array
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.getSinglesendStat({
"aggregated_by": "total",
"timezone": "UTC",
"page_size": 50
})