Skip to main content

Overview

Delivery Stats

Track sent, delivered, bounced, and failed emails

Engagement Rates

Open rates, click rates, and engagement metrics

Status Breakdown

Distribution of emails by delivery status

Time Series

Historical data grouped by day or hour

Get Email Metrics

GET/v1/metrics
Retrieve comprehensive email metrics and analytics for your workspace.

Query Parameters

days
integer
default:"30"
Number of days to look back (max: 90)
group_by
string
Time series grouping: day, hour, or status
curl "https://www.unosend.co/api/v1/metrics?days=30&group_by=day" \
  -H "Authorization: Bearer un_your_api_key"

Response

200 OK
{
  "period": {
    "start": "2023-12-15T00:00:00.000Z",
    "end": "2024-01-15T00:00:00.000Z",
    "days": 30
  },
  "summary": {
    "total": 15420,
    "sent": 15200,
    "delivered": 14950,
    "bounced": 180,
    "failed": 40,
    "queued": 50,
    "scheduled": 0,
    "opens": 8500,
    "unique_opens": 7200,
    "clicks": 2100,
    "unique_clicks": 1850
  },
  "rates": {
    "delivery_rate": 98.4,
    "bounce_rate": 1.2,
    "open_rate": 48.2,
    "click_rate": 12.4
  },
  "time_series": [
    { "period": "2023-12-15", "count": 487 },
    { "period": "2023-12-16", "count": 512 },
    { "period": "2023-12-17", "count": 423 }
  ]
}

Response Fields

Summary Object

FieldDescription
totalTotal emails in the time period
sentEmails successfully sent (includes delivered)
deliveredEmails confirmed delivered to inbox
bouncedEmails that bounced (hard or soft)
failedEmails that failed to send
queuedEmails currently in queue
scheduledEmails scheduled for future delivery
opensTotal open events (includes repeat opens)
unique_opensUnique emails that were opened
clicksTotal click events (includes repeat clicks)
unique_clicksUnique emails with at least one click

Rates Object

FieldDescription
delivery_ratePercentage of sent emails that were delivered
bounce_ratePercentage of sent emails that bounced
open_ratePercentage of delivered emails that were opened
click_ratePercentage of delivered emails with clicks

Grouping Examples

Group by Hour

Get hourly breakdown for the last 24 hours:
curl "https://www.unosend.co/api/v1/metrics?days=1&group_by=hour" \
  -H "Authorization: Bearer un_your_api_key"
Response (time_series)
{
  "time_series": [
    { "period": "00:00", "count": 45 },
    { "period": "01:00", "count": 23 },
    { "period": "02:00", "count": 12 },
    ...
    { "period": "23:00", "count": 67 }
  ]
}

Group by Status

Get counts by delivery status:
curl "https://www.unosend.co/api/v1/metrics?days=30&group_by=status" \
  -H "Authorization: Bearer un_your_api_key"
Response (time_series)
{
  "time_series": [
    { "period": "delivered", "count": 14950 },
    { "period": "bounced", "count": 180 },
    { "period": "failed", "count": 40 },
    { "period": "queued", "count": 50 },
    { "period": "scheduled", "count": 0 }
  ]
}

GET/v1/metrics/links
Get click statistics for tracked links in your emails.
curl "https://www.unosend.co/api/v1/metrics/links?days=30" \
  -H "Authorization: Bearer un_your_api_key"

Response

200 OK
{
  "data": [
    {
      "url": "https://example.com/signup",
      "clicks": 542,
      "unique_clicks": 489,
      "first_clicked_at": "2023-12-15T10:23:00.000Z",
      "last_clicked_at": "2024-01-15T14:45:00.000Z"
    },
    {
      "url": "https://example.com/pricing",
      "clicks": 328,
      "unique_clicks": 301,
      "first_clicked_at": "2023-12-16T08:12:00.000Z",
      "last_clicked_at": "2024-01-15T09:30:00.000Z"
    }
  ]
}
Use link metrics to identify your most effective call-to-actions and optimize email content accordingly.