Metrics
Counts and rates.
| Method | Path | Summary |
|---|---|---|
GET | /v0/inboxes/{inbox_id}/metrics | Query Events (alias) in Inbox |
GET | /v0/inboxes/{inbox_id}/metrics/events | Query Events in Inbox |
GET | /v0/inboxes/{inbox_id}/metrics/rates | Query Rates in Inbox |
GET | /v0/inboxes/{inbox_id}/metrics/usage | Query Usage in Inbox |
GET | /v0/metrics | Query Events (alias) |
GET | /v0/metrics/events | Query Events |
GET | /v0/metrics/rates | Query Rates |
GET | /v0/metrics/usage | Query Usage |
GET | /v0/pods/{pod_id}/metrics | Query Events (alias) in Pod |
GET | /v0/pods/{pod_id}/metrics/events | Query Events in Pod |
GET | /v0/pods/{pod_id}/metrics/rates | Query Rates in Pod |
GET | /v0/pods/{pod_id}/metrics/usage | Query Usage in Pod |
Query Events (alias) in Inbox
Warning
Same as Query Events (alias) (GET /v0/metrics), limited to the inbox.
Authentication: Authorization: Bearer <api key> or the dashboard mm_session cookie. Permission: metrics_read.
Path parameters
inbox_idstringRequiredQuery parameters
event_typesstring[]startstring (date-time)endstring (date-time)limitintegerdescendingbooleanperiodintegerResponse
200 Event counts by type (application/json)
Type: Record<string, MetricBucket[]>
Errors
| Status | Meaning |
|---|---|
400 | Invalid request: error.type is validation and error.param names the field. |
401 | Missing, invalid, expired or revoked credential. |
403 | The credential lacks the permission or scope for this request (error.type forbidden), or MachineMail suspended the organization or its sending (account_suspended: error.message says what still works; do not retry or re-register). |
404 | Not found. Also returned for resources outside the credential scope. |
500 | Unexpected server error. |
Error bodies use the error envelope.
Example
Query Events in Inbox
Same as Query Events (GET /v0/metrics/events), limited to the inbox.
Authentication: Authorization: Bearer <api key> or the dashboard mm_session cookie. Permission: metrics_read.
Path parameters
inbox_idstringRequiredQuery parameters
event_typesstring[]startstring (date-time)endstring (date-time)limitintegerdescendingbooleanperiodintegerResponse
200 Event counts by type (application/json)
Type: Record<string, MetricBucket[]>
Errors
| Status | Meaning |
|---|---|
400 | Invalid request: error.type is validation and error.param names the field. |
401 | Missing, invalid, expired or revoked credential. |
403 | The credential lacks the permission or scope for this request (error.type forbidden), or MachineMail suspended the organization or its sending (account_suspended: error.message says what still works; do not retry or re-register). |
404 | Not found. Also returned for resources outside the credential scope. |
500 | Unexpected server error. |
Error bodies use the error envelope.
Example
Query Rates in Inbox
Same as Query Rates (GET /v0/metrics/rates), limited to the inbox.
Authentication: Authorization: Bearer <api key> or the dashboard mm_session cookie. Permission: metrics_read.
Path parameters
inbox_idstringRequiredQuery parameters
rate_typesstring[]startstring (date-time)endstring (date-time)limitintegerdescendingbooleanperiodintegerwindowintegerResponse
200 Rates by type (application/json)
Type: Record<string, RatePoint[]>
Errors
| Status | Meaning |
|---|---|
400 | Invalid request: error.type is validation and error.param names the field. |
401 | Missing, invalid, expired or revoked credential. |
403 | The credential lacks the permission or scope for this request (error.type forbidden), or MachineMail suspended the organization or its sending (account_suspended: error.message says what still works; do not retry or re-register). |
404 | Not found. Also returned for resources outside the credential scope. |
500 | Unexpected server error. |
Error bodies use the error envelope.
Example
Query Usage in Inbox
Same as Query Usage (GET /v0/metrics/usage), limited to the inbox.
Authentication: Authorization: Bearer <api key> or the dashboard mm_session cookie. Permission: metrics_read.
Path parameters
inbox_idstringRequiredQuery parameters
usage_typesstring[]startstring (date-time)endstring (date-time)limitintegerdescendingbooleanperiodintegerResponse
200 Usage by type (application/json)
Type: Record<string, UsagePoint[]>
Errors
| Status | Meaning |
|---|---|
400 | Invalid request: error.type is validation and error.param names the field. |
401 | Missing, invalid, expired or revoked credential. |
403 | The credential lacks the permission or scope for this request (error.type forbidden), or MachineMail suspended the organization or its sending (account_suspended: error.message says what still works; do not retry or re-register). |
404 | Not found. Also returned for resources outside the credential scope. |
500 | Unexpected server error. |
Error bodies use the error envelope.
Example
Query Events (alias)
Warning
Alias of GET /v0/metrics/events.
Authentication: Authorization: Bearer <api key> or the dashboard mm_session cookie. Permission: metrics_read.
Query parameters
event_typesstring[]startstring (date-time)endstring (date-time)limitintegerdescendingbooleanperiodintegerResponse
200 Event counts by type (application/json)
Type: Record<string, MetricBucket[]>
Errors
| Status | Meaning |
|---|---|
400 | Invalid request: error.type is validation and error.param names the field. |
401 | Missing, invalid, expired or revoked credential. |
403 | The credential lacks the permission or scope for this request (error.type forbidden), or MachineMail suspended the organization or its sending (account_suspended: error.message says what still works; do not retry or re-register). |
500 | Unexpected server error. |
Error bodies use the error envelope.
Example
Query Events
Counts of events per event type over time, in buckets of period seconds (default one day), over the last 24 hours unless start and end say otherwise. message.received includes its sub-types (spam, blocked, unauthenticated, quarantined). At most 100,000 events are counted per query.
Authentication: Authorization: Bearer <api key> or the dashboard mm_session cookie. Permission: metrics_read.
Query parameters
event_typesstring[]startstring (date-time)endstring (date-time)limitintegerdescendingbooleanperiodintegerResponse
200 Event counts by type (application/json)
Type: Record<string, MetricBucket[]>
Errors
| Status | Meaning |
|---|---|
400 | Invalid request: error.type is validation and error.param names the field. |
401 | Missing, invalid, expired or revoked credential. |
403 | The credential lacks the permission or scope for this request (error.type forbidden), or MachineMail suspended the organization or its sending (account_suspended: error.message says what still works; do not retry or re-register). |
500 | Unexpected server error. |
Error bodies use the error envelope.
Example
Query Rates
Rolling bounce and complaint rates. At each period grid point: the bounced (or complained) messages over the preceding window, divided by the messages sent over the same window, with the send count alongside. Defaults: the last 24 hours, period 3600, window 86400.
Authentication: Authorization: Bearer <api key> or the dashboard mm_session cookie. Permission: metrics_read.
Query parameters
rate_typesstring[]startstring (date-time)endstring (date-time)limitintegerdescendingbooleanperiodintegerwindowintegerResponse
200 Rates by type (application/json)
Type: Record<string, RatePoint[]>
Errors
| Status | Meaning |
|---|---|
400 | Invalid request: error.type is validation and error.param names the field. |
401 | Missing, invalid, expired or revoked credential. |
403 | The credential lacks the permission or scope for this request (error.type forbidden), or MachineMail suspended the organization or its sending (account_suspended: error.message says what still works; do not retry or re-register). |
500 | Unexpected server error. |
Error bodies use the error envelope.
Example
Query Usage
Current usage in the scope. Usage history is not kept yet: each series has a single point, at end, with the value now.
Authentication: Authorization: Bearer <api key> or the dashboard mm_session cookie. Permission: metrics_read.
Query parameters
usage_typesstring[]startstring (date-time)endstring (date-time)limitintegerdescendingbooleanperiodintegerResponse
200 Usage by type (application/json)
Type: Record<string, UsagePoint[]>
Errors
| Status | Meaning |
|---|---|
400 | Invalid request: error.type is validation and error.param names the field. |
401 | Missing, invalid, expired or revoked credential. |
403 | The credential lacks the permission or scope for this request (error.type forbidden), or MachineMail suspended the organization or its sending (account_suspended: error.message says what still works; do not retry or re-register). |
500 | Unexpected server error. |
Error bodies use the error envelope.
Example
Query Events (alias) in Pod
Warning
Same as Query Events (alias) (GET /v0/metrics), limited to the pod.
Authentication: Authorization: Bearer <api key> or the dashboard mm_session cookie. Permission: metrics_read.
Path parameters
pod_idstringRequiredQuery parameters
event_typesstring[]startstring (date-time)endstring (date-time)limitintegerdescendingbooleanperiodintegerResponse
200 Event counts by type (application/json)
Type: Record<string, MetricBucket[]>
Errors
| Status | Meaning |
|---|---|
400 | Invalid request: error.type is validation and error.param names the field. |
401 | Missing, invalid, expired or revoked credential. |
403 | The credential lacks the permission or scope for this request (error.type forbidden), or MachineMail suspended the organization or its sending (account_suspended: error.message says what still works; do not retry or re-register). |
404 | Not found. Also returned for resources outside the credential scope. |
500 | Unexpected server error. |
Error bodies use the error envelope.
Example
Query Events in Pod
Same as Query Events (GET /v0/metrics/events), limited to the pod.
Authentication: Authorization: Bearer <api key> or the dashboard mm_session cookie. Permission: metrics_read.
Path parameters
pod_idstringRequiredQuery parameters
event_typesstring[]startstring (date-time)endstring (date-time)limitintegerdescendingbooleanperiodintegerResponse
200 Event counts by type (application/json)
Type: Record<string, MetricBucket[]>
Errors
| Status | Meaning |
|---|---|
400 | Invalid request: error.type is validation and error.param names the field. |
401 | Missing, invalid, expired or revoked credential. |
403 | The credential lacks the permission or scope for this request (error.type forbidden), or MachineMail suspended the organization or its sending (account_suspended: error.message says what still works; do not retry or re-register). |
404 | Not found. Also returned for resources outside the credential scope. |
500 | Unexpected server error. |
Error bodies use the error envelope.
Example
Query Rates in Pod
Same as Query Rates (GET /v0/metrics/rates), limited to the pod.
Authentication: Authorization: Bearer <api key> or the dashboard mm_session cookie. Permission: metrics_read.
Path parameters
pod_idstringRequiredQuery parameters
rate_typesstring[]startstring (date-time)endstring (date-time)limitintegerdescendingbooleanperiodintegerwindowintegerResponse
200 Rates by type (application/json)
Type: Record<string, RatePoint[]>
Errors
| Status | Meaning |
|---|---|
400 | Invalid request: error.type is validation and error.param names the field. |
401 | Missing, invalid, expired or revoked credential. |
403 | The credential lacks the permission or scope for this request (error.type forbidden), or MachineMail suspended the organization or its sending (account_suspended: error.message says what still works; do not retry or re-register). |
404 | Not found. Also returned for resources outside the credential scope. |
500 | Unexpected server error. |
Error bodies use the error envelope.
Example
Query Usage in Pod
Same as Query Usage (GET /v0/metrics/usage), limited to the pod.
Authentication: Authorization: Bearer <api key> or the dashboard mm_session cookie. Permission: metrics_read.
Path parameters
pod_idstringRequiredQuery parameters
usage_typesstring[]startstring (date-time)endstring (date-time)limitintegerdescendingbooleanperiodintegerResponse
200 Usage by type (application/json)
Type: Record<string, UsagePoint[]>
Errors
| Status | Meaning |
|---|---|
400 | Invalid request: error.type is validation and error.param names the field. |
401 | Missing, invalid, expired or revoked credential. |
403 | The credential lacks the permission or scope for this request (error.type forbidden), or MachineMail suspended the organization or its sending (account_suspended: error.message says what still works; do not retry or re-register). |
404 | Not found. Also returned for resources outside the credential scope. |
500 | Unexpected server error. |
Error bodies use the error envelope.