Skip to content

Statistics API

Required permission: stats


Get message

GET /api/v1/messages/{id}

Returns the current status and metadata for a specific message.

Terminal window
curl https://api.emitlo.com/api/v1/messages/550e8400-e29b-41d4-a716-446655440000 \
-H "Authorization: Bearer YOUR_API_KEY"

Response:

{
"status": "success",
"data": {
"message": {
"id": "550e8400-e29b-41d4-a716-446655440000",
"from_email": "hello@yourdomain.com",
"to_email": "user@example.com",
"subject": "Your order is confirmed",
"status": "delivered",
"created_at": "2026-04-20T14:00:00Z",
"delivered_at": "2026-04-20T14:00:03Z"
}
}
}

Message statuses:

StatusDescription
pendingAccepted, not yet queued
queuedIn the delivery queue
deliveredSuccessfully delivered to recipient’s mail server
soft_bouncedTemporary delivery failure (will retry)
hard_bouncedPermanent delivery failure
complainedRecipient marked as spam
deferredDelivery delayed, retrying
failedDelivery failed after all retries

Get message events

GET /api/v1/messages/{id}/events

Returns the full event timeline for a message.

Terminal window
curl https://api.emitlo.com/api/v1/messages/550e8400-e29b-41d4-a716-446655440000/events \
-H "Authorization: Bearer YOUR_API_KEY"

Response:

{
"status": "success",
"data": {
"events": [
{ "type": "queued", "timestamp": "2026-04-20T14:00:00Z" },
{ "type": "sent", "timestamp": "2026-04-20T14:00:01Z" },
{ "type": "delivered", "timestamp": "2026-04-20T14:00:03Z", "tls": true }
]
}
}

Overview stats

GET /api/v1/stats/overview

Returns aggregate delivery statistics for your organization.

Terminal window
curl https://api.emitlo.com/api/v1/stats/overview \
-H "Authorization: Bearer YOUR_API_KEY"

Daily stats

GET /api/v1/stats/daily

Returns per-day statistics for a date range.

Terminal window
curl "https://api.emitlo.com/api/v1/stats/daily?from=2026-04-01&to=2026-04-30" \
-H "Authorization: Bearer YOUR_API_KEY"
ParameterTypeDescription
fromdateStart date (YYYY-MM-DD)
todateEnd date (YYYY-MM-DD)
domain_idintegerFilter by sending domain (optional)