v49

latestOpenAPI 3.1.0Proprietaryraw.githubusercontent.com2026-02-185890337.1 KB
Usage

Get usage timeseries for a tenant

Returns time-bucketed email statistics for a specific tenant.

Use cases:

  • Build usage charts and graphs
  • Identify sending patterns
  • Detect anomalies in delivery rates

Granularity options:

  • hour - Hourly buckets (best for last 7 days)
  • day - Daily buckets (best for last 30-90 days)
  • week - Weekly buckets (best for last 6 months)
  • month - Monthly buckets (best for year-over-year)

The response includes a data point for each time bucket with all email metrics.

get/tenants/{tenantId}/usage/timeseries

Path parameters

tenantIdstring required

The tenant ID

Query parameters

periodstring

Time period for timeseries data. Defaults to current month.

granularity'hour' | 'day' | 'week' | 'month'

Time bucket size for data points

timezonestring

Timezone for period calculations (IANA format). Defaults to UTC.

Response

Tenant usage timeseries

successtrue required

Example response

{
  "data": {
    "tenant_id": "cm6abc123def456",
    "tenant_name": "Acme Corp",
    "granularity": "day",
    "period": {
      "start": "2024-01-01T00:00:00.000Z",
      "end": "2024-01-31T23:59:59.999Z"
    },
    "data": [
      {
        "timestamp": "2024-01-15T00:00:00.000Z",
        "sent": 320,
        "delivered": 310,
        "soft_failed": 5,
        "hard_failed": 2,
        "bounced": 2,
        "held": 1
      }
    ]
  },
  "meta": {
    "requestId": "req_V1StGXR8_Z5jdHi6"
  }
}