v49

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

Get usage stats for a tenant

Returns email sending statistics for a specific tenant over a time period.

Use cases:

  • Display usage dashboard to your customers
  • Calculate per-tenant billing
  • Monitor tenant health and delivery rates

Period formats:

  • Shortcuts: today, yesterday, this_week, last_week, this_month, last_month, last_7_days, last_30_days, last_90_days
  • Month: 2024-01 (full month)
  • Date range: 2024-01-01..2024-01-31
  • Single day: 2024-01-15

Response includes:

  • emails - Counts for sent, delivered, soft_failed, hard_failed, bounced, held
  • rates - Delivery rate and bounce rate as decimals (0.95 = 95%)
get/tenants/{tenantId}/usage

Path parameters

tenantIdstring required

The tenant ID

Query parameters

periodstring

Time period for usage data. Defaults to current month.

Formats:

  • Shortcuts: today, yesterday, this_week, last_week, this_month, last_month, last_7_days, last_30_days, last_90_days
  • Month: 2024-01
  • Range: 2024-01-01..2024-01-31
  • Day: 2024-01-15
timezonestring

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

Response

Tenant usage statistics

successtrue required

Example response

{
  "data": {
    "tenant_id": "cm6abc123def456",
    "tenant_name": "Acme Corp",
    "external_id": "acme_123",
    "period": {
      "start": "2024-01-01T00:00:00.000Z",
      "end": "2024-01-31T23:59:59.999Z"
    },
    "emails": {
      "sent": 10000,
      "delivered": 9700,
      "soft_failed": 100,
      "hard_failed": 50,
      "bounced": 100,
      "held": 50
    },
    "rates": {
      "delivery_rate": 0.97,
      "bounce_rate": 0.015
    }
  },
  "meta": {
    "requestId": "req_V1StGXR8_Z5jdHi6"
  }
}