/api/admin/email-send-statsAdminCount send attempts per transport over time
Counts the outbound send attempts recorded in the email send log within [from, to), per transport and outcome (delivered/failed): once over the whole range, and per hour/day/week/month bucket aligned to timezone. Every bucket overlapping the range is returned, empty ones included. A range may span at most 750 buckets.
getEmailSendStatsAdmin: Email Send LogAuthentication & permissionsAdmin
Platform administrators only
- Accepted credentials
- Access token (Bearer)
Authorization: Bearer <JWT> - Access token (cookie)
cookie "access_token_schemavaults-mail"
- Access token (Bearer)
- Who may call
- Platform administrators only
Query parameters
| Name | Type | Description |
|---|---|---|
| from | integer | null | Start of the range (inclusive), Unix epoch milliseconds. Defaults to 30 days before |
| to | integer | null | End of the range (exclusive), Unix epoch milliseconds. Defaults to now. |
| timezone | string | IANA time zone the buckets are aligned to, e.g. so daily buckets run from local midnight (default |
| granularity | EmailSendStatsGranularity & any | Bucket size (default |
Responses
| Property | Type | Description |
|---|---|---|
| success* | true | |
| data* | EmailSendStats | Outbound send attempts from the email send log, counted per transport and time bucket. Counts only — no message content. |
| from* | number | Start of the range (inclusive), Unix epoch milliseconds. |
| to* | number | End of the range (exclusive), Unix epoch milliseconds. |
| timezone* | string | The IANA time zone buckets were aligned to. |
| granularity* | EmailSendStatsGranularity | How send attempts are grouped over time: by |
| totals* | EmailSendStatsTransportCounts[] | Counts per transport over the whole range; transports without attempts in range are omitted. |
| transport* | string | null | null | The transport the attempts were dispatched through, or null for attempts that resolved no transport (e.g. a misconfigured MAIL_TRANSPORT). |
| delivered* | integer | Attempts the transport accepted for delivery. minimum: 0 |
| failed* | integer | Attempts that failed. minimum: 0 |
| buckets* | EmailSendStatsBucket[] | Every bucket overlapping the range, oldest first — including empty ones, so the series has no gaps. |
| bucket_start* | number | Unix epoch milliseconds when the bucket starts (local midnight for daily buckets, in the requested time zone). The first bucket may start before |
| transports* | EmailSendStatsTransportCounts[] | Counts per transport within the bucket; transports without attempts in it are omitted. |
| transport* | string | null | null | The transport the attempts were dispatched through, or null for attempts that resolved no transport (e.g. a misconfigured MAIL_TRANSPORT). |
| delivered* | integer | Attempts the transport accepted for delivery. minimum: 0 |
| failed* | integer | Attempts that failed. minimum: 0 |
Example request
curl -X GET 'https://mail.schemavaults.com/api/admin/email-send-stats' \
-H 'Authorization: Bearer <access_token>'