---
title: "Get aggregated email metrics"
method: GET
path: "/stats"
tags: ["Analytics"]
---

# Get aggregated email metrics

`GET /stats`

Backward-compatible alias for `GET /metrics`. Returns aggregated email engagement metrics for the specified time period and supports the same emailType filter.

## Query parameters

- `period` '1h' | '24h' | '7d' | '30d' | '90d'
- `start` string, date-time
- `end` string, date-time
- `emailType` 'campaign' | 'transactional' | 'sequence'
- `mailboxProvider` string
- `includeMachineEngagement` boolean

## Response `200`

Success

- object
  - `success` boolean
  - `period` string
  - `emailType` 'campaign' | 'transactional' | 'sequence'
  - `mailboxProvider` string — Echoed back when `mailboxProvider` is provided.
  - `stats` EngagementStats — Unified engagement metrics returned by analytics endpoints. When a period or start/end filter is applied these are a funnel over the sends made inside that window, not a log of events inside it: every delivery, engagement, and reply count is attributed to one of those sends, including activity that arrives after the window closes, so opened <= delivered <= sent always holds and no rate can exceed 100%. conversions and revenueCents are the exception and use the goal's own last-touch attribution window. Open and click metrics exclude detected scanner, preview, and tracked asset events unless includeMachineEngagement is true.
    - `sent` integer
    - `delivered` integer — Capped at sent count
    - `bounced` integer — Unique bounces (deduplicated by email send)
    - `opened` integer — Unique opens (deduplicated by email send)
    - `clicked` integer — Unique clicks (deduplicated by email send)
    - `replies` integer — Inbound replies captured for delivered emails
    - `unsubscribed` integer
    - `deliveryRate` number — Percentage (0-100)
    - `bounceRate` number — Percentage (0-100), calculated from sent emails
    - `rateDenominator` integer — The number every engagement rate divides by: delivered, falling back to sent when no delivery events were recorded, and 0 when nothing was sent
    - `rateDenominatorBasis` 'delivered' | 'sent' | 'none' — Which field rateDenominator was taken from
    - `openRate` number — Percentage (0-100), opened / rateDenominator
    - `clickRate` number — Percentage (0-100), clicked / rateDenominator
    - `replyRate` number — Percentage (0-100), replies / rateDenominator
    - `unsubscribeRate` number — Percentage (0-100), unsubscribed / rateDenominator
    - `conversions` integer — Attributed goal conversions (last-touch, 24h window). Only returned by campaign and sequence metrics endpoints.
    - `revenueCents` integer — Attributed revenue in cents from purchase events (saas.purchase and ecommerce.order_placed). Only returned by campaign and sequence metrics endpoints.
  - `commerceForecast` CommerceValueForecast — Explainable commerce forecast derived from up to two years of provider-neutral placed-order events.
    - `status` 'ready' | 'insufficient_data'
    - `generatedAt` string, date-time
    - `modelVersion` string
    - `currency` string, nullable
    - `confidence` 'low' | 'medium' | 'high', nullable
    - `isSampled` boolean
    - `eligibility` object
      - `reasons` object[]
        - `code` string
        - `message` string
        - `current` number
        - `required` number
    - `history` object
      - `orderCount` integer
      - `customerCount` integer
      - `repeatCustomerCount` integer
      - `historyDays` integer
      - `daysSinceLastOrder` integer
      - `excludedCurrencyOrderCount` integer
    - `actual` object
      - `averageOrderValueCents` integer, nullable
      - `averageCustomerValueCents` integer, nullable
      - `repeatPurchaseRate` number, nullable
    - `forecast` object, nullable
      - `predictedAverageOrderValueCents` integer
      - `predictedAverageOrderValueRange` CommerceForecastRange
        - `lowCents` integer
        - `highCents` integer
      - `predictedCustomerValue365DaysCents` integer
      - `predictedCustomerValue365DaysRange` CommerceForecastRange
        - `lowCents` integer
        - `highCents` integer
      - `expectedOrders90Days` number
      - `expectedRevenue90DaysCents` integer
      - `expectedRevenue90DaysRange` CommerceForecastRange
        - `lowCents` integer
        - `highCents` integer

## Other responses

- `400` — Invalid period or email type parameter
- `401` — Unauthorized

---

[API](https://skmtc.net/sequenzy/apis/sequenzy-api.md) · [All operations](https://skmtc.net/sequenzy/apis/sequenzy-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/sequenzy/sequenzy-api/versions/af1cf9620482/schema)
