Stats API

Retrieve aggregated, daily, hourly, and per-ISP sending statistics for your domains.

Monitor your deliverability

Use the Stats API to track delivery rates, bounce rates, and complaint rates over time. Monitoring these metrics helps you catch deliverability issues early, maintain a healthy sender reputation, and optimize your email sending strategy.

Get Aggregated Stats

GET /v1/domains/:id/stats

Returns aggregated sending metrics for a domain over a configurable number of days. Includes calculated rates (delivery, bounce, open, click, complaint) and current-day/hour volume.

Query Parameters

ParameterTypeDescription
daysintegerNumber of days to aggregate (default: 7, max: 90)

Example Request

curl -X GET "https://api.postscale.io/v1/domains/d290f1ee-6c54-4b01-90e6-d701748f0851/stats?days=30" \
  -H "Authorization: Bearer ps_live_your_api_key"

Response

{
  "domain_id": "d290f1ee-6c54-4b01-90e6-d701748f0851",
  "domain": "yourapp.com",
  "period_days": 30,
  "metrics": {
    "period_days": 30,
    "total_sent": 15420,
    "total_delivered": 15105,
    "total_bounced": 280,
    "total_hard_bounce": 45,
    "total_complaints": 3,
    "total_opened": 6042,
    "total_clicked": 1812,
    "delivery_rate": 0.9796,
    "bounce_rate": 0.0182,
    "hard_bounce_rate": 0.0029,
    "complaint_rate": 0.0002,
    "open_rate": 0.4000,
    "click_rate": 0.1200
  },
  "today_sent": 512,
  "this_hour_sent": 34
}

Get Daily Stats

GET /v1/domains/:id/stats/daily

Returns daily aggregated statistics for a domain. Each entry represents one day and includes absolute counts and calculated rates.

Query Parameters

ParameterTypeDescription
daysintegerNumber of days to retrieve (default: 30, max: 90)

Example Request

curl -X GET "https://api.postscale.io/v1/domains/d290f1ee-6c54-4b01-90e6-d701748f0851/stats/daily?days=7" \
  -H "Authorization: Bearer ps_live_your_api_key"

Response

{
  "domain_id": "d290f1ee-6c54-4b01-90e6-d701748f0851",
  "domain": "yourapp.com",
  "days": 7,
  "stats": [
    {
      "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "domain_id": "d290f1ee-6c54-4b01-90e6-d701748f0851",
      "date": "2026-02-10T00:00:00Z",
      "emails_sent": 2150,
      "emails_delivered": 2108,
      "emails_bounced": 38,
      "hard_bounces": 5,
      "soft_bounces": 33,
      "complaints": 0,
      "emails_opened": 842,
      "emails_clicked": 253,
      "delivery_rate": 0.9805,
      "bounce_rate": 0.0177,
      "hard_bounce_rate": 0.0023,
      "complaint_rate": 0.0,
      "open_rate": 0.3994,
      "created_at": "2026-02-10T00:05:00Z"
    },
    {
      "id": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
      "domain_id": "d290f1ee-6c54-4b01-90e6-d701748f0851",
      "date": "2026-02-09T00:00:00Z",
      "emails_sent": 1980,
      "emails_delivered": 1941,
      "emails_bounced": 35,
      "hard_bounces": 8,
      "soft_bounces": 27,
      "complaints": 1,
      "emails_opened": 776,
      "emails_clicked": 210,
      "delivery_rate": 0.9803,
      "bounce_rate": 0.0177,
      "hard_bounce_rate": 0.0040,
      "complaint_rate": 0.0005,
      "open_rate": 0.3998,
      "created_at": "2026-02-09T00:05:00Z"
    }
  ]
}

Get Hourly Stats

GET /v1/domains/:id/stats/hourly

Returns hourly sending statistics for a domain. Each entry represents one hour bucket and includes per-hour counts. Useful for identifying sending patterns and diagnosing short-term delivery issues.

Query Parameters

ParameterTypeDescription
hoursintegerNumber of hours to retrieve (default: 24, max: 168)

Example Request

curl -X GET "https://api.postscale.io/v1/domains/d290f1ee-6c54-4b01-90e6-d701748f0851/stats/hourly?hours=48" \
  -H "Authorization: Bearer ps_live_your_api_key"

Response

{
  "domain_id": "d290f1ee-6c54-4b01-90e6-d701748f0851",
  "domain": "yourapp.com",
  "hours": 48,
  "from": "2026-02-08T10:00:00Z",
  "to": "2026-02-10T10:00:00Z",
  "stats": [
    {
      "id": "c3d4e5f6-a7b8-9012-cdef-123456789012",
      "domain_id": "d290f1ee-6c54-4b01-90e6-d701748f0851",
      "hour_bucket": "2026-02-10T09:00:00Z",
      "emails_sent": 89,
      "emails_delivered": 87,
      "emails_bounced": 2,
      "emails_deferred": 0,
      "hard_bounces": 0,
      "soft_bounces": 2,
      "emails_opened": 31,
      "emails_clicked": 8,
      "complaints": 0,
      "created_at": "2026-02-10T09:00:00Z",
      "updated_at": "2026-02-10T09:58:12Z"
    },
    {
      "id": "d4e5f6a7-b8c9-0123-defa-234567890123",
      "domain_id": "d290f1ee-6c54-4b01-90e6-d701748f0851",
      "hour_bucket": "2026-02-10T08:00:00Z",
      "emails_sent": 124,
      "emails_delivered": 121,
      "emails_bounced": 3,
      "emails_deferred": 1,
      "hard_bounces": 1,
      "soft_bounces": 2,
      "emails_opened": 45,
      "emails_clicked": 12,
      "complaints": 0,
      "created_at": "2026-02-10T08:00:00Z",
      "updated_at": "2026-02-10T08:59:45Z"
    }
  ]
}

Get ISP Stats

GET /v1/domains/:id/stats/isp

Returns per-ISP sending statistics for a domain. Breaks down sending volume and engagement by inbox provider (Gmail, Microsoft, Yahoo, Apple, Proton, and others). Useful for identifying ISP-specific deliverability problems.

Query Parameters

ParameterTypeDescription
daysintegerNumber of days to aggregate (default: 7, max: 90)

Example Request

curl -X GET "https://api.postscale.io/v1/domains/d290f1ee-6c54-4b01-90e6-d701748f0851/stats/isp?days=14" \
  -H "Authorization: Bearer ps_live_your_api_key"

Response

{
  "domain_id": "d290f1ee-6c54-4b01-90e6-d701748f0851",
  "domain": "yourapp.com",
  "days": 14,
  "isp_stats": [
    {
      "isp": "gmail",
      "sent": 5230,
      "delivered": 5122,
      "bounced": 95,
      "opened": 2048,
      "clicked": 614
    },
    {
      "isp": "microsoft",
      "sent": 3840,
      "delivered": 3762,
      "bounced": 71,
      "opened": 1152,
      "clicked": 346
    },
    {
      "isp": "yahoo",
      "sent": 2100,
      "delivered": 2058,
      "bounced": 38,
      "opened": 630,
      "clicked": 189
    },
    {
      "isp": "apple",
      "sent": 980,
      "delivered": 960,
      "bounced": 18,
      "opened": 392,
      "clicked": 118
    },
    {
      "isp": "proton",
      "sent": 310,
      "delivered": 304,
      "bounced": 5,
      "opened": 0,
      "clicked": 0
    },
    {
      "isp": "other",
      "sent": 2960,
      "delivered": 2899,
      "bounced": 53,
      "opened": 1820,
      "clicked": 545
    }
  ],
  "known_isps": ["gmail", "microsoft", "yahoo", "apple", "proton"]
}

Metrics Reference

Aggregated Metrics Fields

FieldTypeDescription
total_sentintegerTotal emails sent in the period
total_deliveredintegerTotal emails delivered
total_bouncedintegerTotal emails bounced (hard + soft)
total_hard_bounceintegerTotal hard bounces
total_complaintsintegerTotal spam complaints
total_openedintegerTotal unique opens
total_clickedintegerTotal unique clicks
delivery_ratefloatDelivered / sent (0.0 to 1.0)
bounce_ratefloatBounced / sent (0.0 to 1.0)
hard_bounce_ratefloatHard bounces / sent (0.0 to 1.0)
complaint_ratefloatComplaints / sent (0.0 to 1.0)
open_ratefloatOpened / delivered (0.0 to 1.0)
click_ratefloatClicked / delivered (0.0 to 1.0)

Daily Stats Fields

FieldTypeDescription
datestringDate for this bucket (ISO 8601)
emails_sentintegerEmails sent on this day
emails_deliveredintegerEmails delivered on this day
emails_bouncedintegerEmails bounced on this day
hard_bouncesintegerHard bounces on this day
soft_bouncesintegerSoft bounces on this day
complaintsintegerSpam complaints on this day
emails_openedintegerOpens on this day
emails_clickedintegerClicks on this day
delivery_ratefloatDelivered / sent for this day
bounce_ratefloatBounced / sent for this day
hard_bounce_ratefloatHard bounces / sent for this day
complaint_ratefloatComplaints / sent for this day
open_ratefloatOpened / delivered for this day

Hourly Stats Fields

FieldTypeDescription
hour_bucketstringHour bucket timestamp (ISO 8601, truncated to hour)
emails_sentintegerEmails sent in this hour
emails_deliveredintegerEmails delivered in this hour
emails_bouncedintegerEmails bounced in this hour
emails_deferredintegerEmails deferred in this hour
hard_bouncesintegerHard bounces in this hour
soft_bouncesintegerSoft bounces in this hour
emails_openedintegerOpens in this hour
emails_clickedintegerClicks in this hour
complaintsintegerSpam complaints in this hour

ISP Stats Fields

FieldTypeDescription
ispstringISP identifier (gmail, microsoft, yahoo, apple, proton, other)
sentintegerEmails sent to this ISP
deliveredintegerEmails delivered to this ISP
bouncedintegerEmails bounced at this ISP
openedintegerOpens at this ISP
clickedintegerClicks at this ISP