Skip to content

Statistics, bounces, and audit

These three endpoints give you complete visibility into what happened with your emails: how many were sent, which ones bounced, and a detailed record of each event. Use them to monitor the health of your deliverability, debug delivery issues, and generate activity reports.

Returns aggregated server metrics for the specified period.

GET https://api.mailerdash.com/v1/mail/stats

Query params:

ParameterTypeDefaultDescription
hoursinteger24Lookback time window. Maximum 720 (30 days).
key_idstringAdmin only. Filters metrics by a specific API key.

Example:

Ventana de terminal
curl https://api.mailerdash.com/v1/mail/stats?hours=48 \
-H "Authorization: Bearer $MAILERDASH_API_KEY"

Lists bounces processed by the system, from most recent to oldest.

GET https://api.mailerdash.com/v1/mail/bounces

Query params:

ParameterTypeDefaultDescription
limitinteger100Number of results. Maximum 1000.
offsetinteger0Pagination cursor.
recipientstringFilters by recipient email address.
statusstringFilters by DSN code (e.g. 5.1.1 for unknown user).
key_idstringAdmin only. Filters by API key.

Response:

{
"total": 42,
"limit": 100,
"offset": 0,
"items": [
{
"id": 17,
"recipient": "inexistente@example.com",
"status": "5.1.1",
"raw": "User unknown",
"created_at": "2026-06-21T14:32:00Z"
}
]
}

Audit log of sends and account actions, with support for advanced filters and CSV export.

GET https://api.mailerdash.com/v1/mail/audit

Query params:

ParameterTypeDefaultDescription
limitinteger100Number of results. Maximum 1000.
offsetinteger0Pagination cursor.
appstringFilters by key ID (app in the audit).
eventstringFilters by event type: sent, failed, queued. Accepts CSV for multiple: sent,failed.
fromstringISO 8601 start timestamp for the range (e.g. 2026-06-01T00:00:00Z).
tostringISO 8601 end timestamp for the range.
searchstringSubstring search against the recipient or subject.
sort_bystringtsSort field: ts, event, subject.
sort_dirstringdescDirection: asc or desc.
formatstringjsonjson (paginated) or csv (full download, ignores limit/offset).

JSON response:

{
"total": 1240,
"limit": 100,
"offset": 0,
"items": [
{
"id": 998,
"ts": "2026-06-22T09:15:00Z",
"event": "sent",
"app": "<key-id>",
"recipient": "cliente@example.com",
"subject": "Tu recibo #4567",
"message_id": "<abc123@api.mailerdash.com>"
}
]
}
Ventana de terminal
curl "https://api.mailerdash.com/v1/mail/stats?hours=48" \
-H "Authorization: Bearer $MAILERDASH_API_KEY"
Ventana de terminal
curl "https://api.mailerdash.com/v1/mail/bounces?recipient=usuario@example.com&limit=20" \
-H "Authorization: Bearer $MAILERDASH_API_KEY"

Example: audit of failed sends in a date range

Section titled “Example: audit of failed sends in a date range”
Ventana de terminal
curl "https://api.mailerdash.com/v1/mail/audit?event=failed&from=2026-06-01T00:00:00Z&to=2026-06-22T23:59:59Z&sort_dir=asc" \
-H "Authorization: Bearer $MAILERDASH_API_KEY"

For the complete response schema and error codes, see the transactional API reference.