Statistics API
Required permission: stats
Get message
GET /api/v1/messages/{id}
Returns the current status and metadata for a specific message.
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:
| Status | Description |
|---|---|
pending | Accepted, not yet queued |
queued | In the delivery queue |
delivered | Successfully delivered to recipient’s mail server |
soft_bounced | Temporary delivery failure (will retry) |
hard_bounced | Permanent delivery failure |
complained | Recipient marked as spam |
deferred | Delivery delayed, retrying |
failed | Delivery failed after all retries |
Get message events
GET /api/v1/messages/{id}/events
Returns the full event timeline for a message.
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.
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.
curl "https://api.emitlo.com/api/v1/stats/daily?from=2026-04-01&to=2026-04-30" \ -H "Authorization: Bearer YOUR_API_KEY"| Parameter | Type | Description |
|---|---|---|
from | date | Start date (YYYY-MM-DD) |
to | date | End date (YYYY-MM-DD) |
domain_id | integer | Filter by sending domain (optional) |