Usage

Export tenant usage data

Changed on

Export email usage data for all tenants in CSV or JSON Lines format. Designed for billing system integration, data warehousing, and analytics.

Jobs to be done:

  • Import usage data into billing systems (Stripe, Chargebee, etc.)
  • Load into data warehouses (Snowflake, BigQuery, etc.)
  • Process in spreadsheets (Excel, Google Sheets)
  • Feed into BI tools (Looker, Metabase, etc.)

Export formats:

  • csv - UTF-8 with BOM for Excel compatibility (default)
  • jsonl - JSON Lines (one JSON object per line, streamable)

CSV columns: tenant_id, tenant_name, external_id, status, sent, delivered, soft_failed, hard_failed, bounced, held, delivery_rate, bounce_rate, period_start, period_end

Response headers:

  • Content-Disposition - Filename for download
  • Content-Type - text/csv or application/x-ndjson
get/usage/export

Request

Query parameters

periodstring

Time period for export.

Shortcuts: this_month, last_month, last_30_days, etc.

Month format: 2024-01 (YYYY-MM)

Custom range: 2024-01-01..2024-01-15

format'csv' | 'jsonl'

Export format

status'active' | 'suspended' | 'archived'

Filter by tenant status

minSentinteger

Only include tenants with at least this many emails sent

timezonestring

Timezone for period calculations (IANA format)

Response

Usage export data

tenant_idstring required

Unique tenant identifier

tenant_namestring required

Tenant display name

external_idstring nullable

Your external ID for this tenant

status'active' | 'suspended' | 'archived' required

Current tenant status

sentinteger required

Total emails sent

deliveredinteger required

Emails successfully delivered

soft_failedinteger required

Emails that soft-failed

hard_failedinteger required

Emails that hard-failed

bouncedinteger required

Emails that bounced

heldinteger required

Emails currently held

delivery_ratenumber float required

Delivery rate (0-1)

bounce_ratenumber float required

Bounce rate (0-1)

Example response

[
  {
    "tenant_id": "cm6abc123def456",
    "tenant_name": "Acme Corp",
    "external_id": "acme_123",
    "status": "active",
    "sent": 10000,
    "delivered": 9700,
    "soft_failed": 100,
    "hard_failed": 50,
    "bounced": 100,
    "held": 50,
    "delivery_rate": 0.97,
    "bounce_rate": 0.015
  }
]

Changes

    • breaking

      for the query request parameter period, default value this_month was added

    • breaking

      removed the enum value json from the query request parameter format

    • warning

      deleted the query request parameter min_sent

    • warning

      added the new infrastructure_error enum value to the / response property for the response status

    • warning

      added the new infrastructure_error enum value to the / response property for the response status

    • warning

      added the new infrastructure_error enum value to the / response property for the response status

    • warning

      added the new infrastructure_error enum value to the / response property for the response status

    • info

      added the new optional query request parameter minSent

    • info

      removed the postal_error enum value from the / response property for the response status

    • info

      removed the postal_error enum value from the / response property for the response status

    • info

      removed the postal_error enum value from the / response property for the response status

    • info

      removed the postal_error enum value from the / response property for the response status

    • warning

      added the new already_exists enum value to the / response property for the response status

    • warning

      added the new already_exists enum value to the / response property for the response status

    • warning

      added the new already_exists enum value to the / response property for the response status

    • warning

      added the new already_exists enum value to the / response property for the response status

    • warning

      added the new attachment_too_large enum value to the / response property for the response status

    • warning

      added the new attachment_too_large enum value to the / response property for the response status

    • warning

      added the new attachment_too_large enum value to the / response property for the response status

    • warning

      added the new attachment_too_large enum value to the / response property for the response status

    • warning

      added the new authentication_required enum value to the / response property for the response status

    • warning

      added the new authentication_required enum value to the / response property for the response status

    • warning

      added the new authentication_required enum value to the / response property for the response status

    • warning

      added the new authentication_required enum value to the / response property for the response status

    • warning

      added the new billing_error enum value to the / response property for the response status

    • warning

      added the new billing_error enum value to the / response property for the response status

    • warning

      added the new billing_error enum value to the / response property for the response status

    • warning

      added the new billing_error enum value to the / response property for the response status

    • warning

      added the new billing_not_configured enum value to the / response property for the response status

    • warning

      added the new billing_not_configured enum value to the / response property for the response status

    • warning

      added the new billing_not_configured enum value to the / response property for the response status

    • warning

      added the new billing_not_configured enum value to the / response property for the response status

    • warning

      added the new credential_not_found enum value to the / response property for the response status

    • warning

      added the new credential_not_found enum value to the / response property for the response status

    • warning

      added the new credential_not_found enum value to the / response property for the response status

    • warning

      added the new credential_not_found enum value to the / response property for the response status

    • warning

      added the new credential_on_hold enum value to the / response property for the response status

    • warning

      added the new credential_on_hold enum value to the / response property for the response status

    • warning

      added the new credential_on_hold enum value to the / response property for the response status

    • warning

      added the new credential_on_hold enum value to the / response property for the response status

    • warning

      added the new credential_revoked enum value to the / response property for the response status

    • warning

      added the new credential_revoked enum value to the / response property for the response status

    • warning

      added the new credential_revoked enum value to the / response property for the response status

    • warning

      added the new credential_revoked enum value to the / response property for the response status

    • warning

      added the new delivery_not_found enum value to the / response property for the response status

    • warning

      added the new delivery_not_found enum value to the / response property for the response status

    • warning

      added the new delivery_not_found enum value to the / response property for the response status

    • warning

      added the new delivery_not_found enum value to the / response property for the response status

    • warning

      added the new domain_already_exists enum value to the / response property for the response status

    • warning

      added the new domain_already_exists enum value to the / response property for the response status

    • warning

      added the new domain_already_exists enum value to the / response property for the response status

    • warning

      added the new domain_already_exists enum value to the / response property for the response status

    • warning

      added the new domain_not_found enum value to the / response property for the response status

    • warning

      added the new domain_not_found enum value to the / response property for the response status

    • warning

      added the new domain_not_found enum value to the / response property for the response status

    • warning

      added the new domain_not_found enum value to the / response property for the response status

    • warning

      added the new domain_not_verified enum value to the / response property for the response status

    • warning

      added the new domain_not_verified enum value to the / response property for the response status

    • warning

      added the new domain_not_verified enum value to the / response property for the response status

    • warning

      added the new domain_not_verified enum value to the / response property for the response status

    • warning

      added the new email_not_found enum value to the / response property for the response status

    • warning

      added the new email_not_found enum value to the / response property for the response status

    • warning

      added the new email_not_found enum value to the / response property for the response status

    • warning

      added the new email_not_found enum value to the / response property for the response status

    • warning

      added the new external_id_already_exists enum value to the / response property for the response status

    • warning

      added the new external_id_already_exists enum value to the / response property for the response status

    • warning

      added the new external_id_already_exists enum value to the / response property for the response status

    • warning

      added the new external_id_already_exists enum value to the / response property for the response status

    • warning

      added the new forbidden enum value to the / response property for the response status

    • warning

      added the new forbidden enum value to the / response property for the response status

    • warning

      added the new forbidden enum value to the / response property for the response status

    • warning

      added the new forbidden enum value to the / response property for the response status

    • warning

      added the new idempotency_conflict enum value to the / response property for the response status

    • warning

      added the new idempotency_conflict enum value to the / response property for the response status

    • warning

      added the new idempotency_conflict enum value to the / response property for the response status

    • warning

      added the new idempotency_conflict enum value to the / response property for the response status

    • warning

      added the new insufficient_balance enum value to the / response property for the response status

    • warning

      added the new insufficient_balance enum value to the / response property for the response status

    • warning

      added the new insufficient_balance enum value to the / response property for the response status

    • warning

      added the new insufficient_balance enum value to the / response property for the response status

    • warning

      added the new internal_error enum value to the / response property for the response status

    • warning

      added the new internal_error enum value to the / response property for the response status

    • warning

      added the new internal_error enum value to the / response property for the response status

    • warning

      added the new internal_error enum value to the / response property for the response status

    • warning

      added the new invalid_api_key enum value to the / response property for the response status

    • warning

      added the new invalid_api_key enum value to the / response property for the response status

    • warning

      added the new invalid_api_key enum value to the / response property for the response status

    • warning

      added the new invalid_api_key enum value to the / response property for the response status

    • warning

      added the new invalid_email_address enum value to the / response property for the response status

    • warning

      added the new invalid_email_address enum value to the / response property for the response status

    • warning

      added the new invalid_email_address enum value to the / response property for the response status

    • warning

      added the new invalid_email_address enum value to the / response property for the response status

    • warning

      added the new invalid_raw_message enum value to the / response property for the response status

    • warning

      added the new invalid_raw_message enum value to the / response property for the response status

    • warning

      added the new invalid_raw_message enum value to the / response property for the response status

    • warning

      added the new invalid_raw_message enum value to the / response property for the response status

    • warning

      added the new invalid_request enum value to the / response property for the response status

    • warning

      added the new invalid_request enum value to the / response property for the response status

    • warning

      added the new invalid_request enum value to the / response property for the response status

    • warning

      added the new invalid_request enum value to the / response property for the response status

    • warning

      added the new ip_not_allowed enum value to the / response property for the response status

    • warning

      added the new ip_not_allowed enum value to the / response property for the response status

    • warning

      added the new ip_not_allowed enum value to the / response property for the response status

    • warning

      added the new ip_not_allowed enum value to the / response property for the response status

    • warning

      added the new message_too_large enum value to the / response property for the response status

    • warning

      added the new message_too_large enum value to the / response property for the response status

    • warning

      added the new message_too_large enum value to the / response property for the response status

    • warning

      added the new message_too_large enum value to the / response property for the response status

    • warning

      added the new metadata_key_invalid enum value to the / response property for the response status

    • warning

      added the new metadata_key_invalid enum value to the / response property for the response status

    • warning

      added the new metadata_key_invalid enum value to the / response property for the response status

    • warning

      added the new metadata_key_invalid enum value to the / response property for the response status

    • warning

      added the new metadata_too_large enum value to the / response property for the response status

    • warning

      added the new metadata_too_large enum value to the / response property for the response status

    • warning

      added the new metadata_too_large enum value to the / response property for the response status

    • warning

      added the new metadata_too_large enum value to the / response property for the response status

    • warning

      added the new metadata_value_invalid enum value to the / response property for the response status

    • warning

      added the new metadata_value_invalid enum value to the / response property for the response status

    • warning

      added the new metadata_value_invalid enum value to the / response property for the response status

    • warning

      added the new metadata_value_invalid enum value to the / response property for the response status

    • warning

      added the new missing_field enum value to the / response property for the response status

    • warning

      added the new missing_field enum value to the / response property for the response status

    • warning

      added the new missing_field enum value to the / response property for the response status

    • warning

      added the new missing_field enum value to the / response property for the response status

    • warning

      added the new missing_scope enum value to the / response property for the response status

    • warning

      added the new missing_scope enum value to the / response property for the response status

    • warning

      added the new missing_scope enum value to the / response property for the response status

    • warning

      added the new missing_scope enum value to the / response property for the response status

    • warning

      added the new not_found enum value to the / response property for the response status

    • warning

      added the new not_found enum value to the / response property for the response status

    • warning

      added the new not_found enum value to the / response property for the response status

    • warning

      added the new not_found enum value to the / response property for the response status

    • warning

      added the new payload_too_large enum value to the / response property for the response status

    • warning

      added the new payload_too_large enum value to the / response property for the response status

    • warning

      added the new payload_too_large enum value to the / response property for the response status

    • warning

      added the new payload_too_large enum value to the / response property for the response status

    • warning

      added the new payment_required enum value to the / response property for the response status

    • warning

      added the new payment_required enum value to the / response property for the response status

    • warning

      added the new payment_required enum value to the / response property for the response status

    • warning

      added the new payment_required enum value to the / response property for the response status

    • warning

      added the new postal_error enum value to the / response property for the response status

    • warning

      added the new postal_error enum value to the / response property for the response status

    • warning

      added the new postal_error enum value to the / response property for the response status

    • warning

      added the new postal_error enum value to the / response property for the response status

    • warning

      added the new rate_limit_exceeded enum value to the / response property for the response status

    • warning

      added the new rate_limit_exceeded enum value to the / response property for the response status

    • warning

      added the new rate_limit_exceeded enum value to the / response property for the response status

    • warning

      added the new rate_limit_exceeded enum value to the / response property for the response status

    • warning

      added the new send_limit_exceeded enum value to the / response property for the response status

    • warning

      added the new send_limit_exceeded enum value to the / response property for the response status

    • warning

      added the new send_limit_exceeded enum value to the / response property for the response status

    • warning

      added the new send_limit_exceeded enum value to the / response property for the response status

    • warning

      added the new server_suspended enum value to the / response property for the response status

    • warning

      added the new server_suspended enum value to the / response property for the response status

    • warning

      added the new server_suspended enum value to the / response property for the response status

    • warning

      added the new server_suspended enum value to the / response property for the response status

    • warning

      added the new service_unavailable enum value to the / response property for the response status

    • warning

      added the new service_unavailable enum value to the / response property for the response status

    • warning

      added the new service_unavailable enum value to the / response property for the response status

    • warning

      added the new service_unavailable enum value to the / response property for the response status

    • warning

      added the new suppressed_recipient enum value to the / response property for the response status

    • warning

      added the new suppressed_recipient enum value to the / response property for the response status

    • warning

      added the new suppressed_recipient enum value to the / response property for the response status

    • warning

      added the new suppressed_recipient enum value to the / response property for the response status

    • warning

      added the new suppression_not_found enum value to the / response property for the response status

    • warning

      added the new suppression_not_found enum value to the / response property for the response status

    • warning

      added the new suppression_not_found enum value to the / response property for the response status

    • warning

      added the new suppression_not_found enum value to the / response property for the response status

    • warning

      added the new tenant_not_found enum value to the / response property for the response status

    • warning

      added the new tenant_not_found enum value to the / response property for the response status

    • warning

      added the new tenant_not_found enum value to the / response property for the response status

    • warning

      added the new tenant_not_found enum value to the / response property for the response status

    • warning

      added the new too_many_attachments enum value to the / response property for the response status

    • warning

      added the new too_many_attachments enum value to the / response property for the response status

    • warning

      added the new too_many_attachments enum value to the / response property for the response status

    • warning

      added the new too_many_attachments enum value to the / response property for the response status

    • warning

      added the new too_many_recipients enum value to the / response property for the response status

    • warning

      added the new too_many_recipients enum value to the / response property for the response status

    • warning

      added the new too_many_recipients enum value to the / response property for the response status

    • warning

      added the new too_many_recipients enum value to the / response property for the response status

    • warning

      added the new unauthenticated_from_address enum value to the / response property for the response status

    • warning

      added the new unauthenticated_from_address enum value to the / response property for the response status

    • warning

      added the new unauthenticated_from_address enum value to the / response property for the response status

    • warning

      added the new unauthenticated_from_address enum value to the / response property for the response status

    • warning

      added the new unprocessable_entity enum value to the / response property for the response status

    • warning

      added the new unprocessable_entity enum value to the / response property for the response status

    • warning

      added the new unprocessable_entity enum value to the / response property for the response status

    • warning

      added the new unprocessable_entity enum value to the / response property for the response status

    • warning

      added the new validation_error enum value to the / response property for the response status

    • warning

      added the new validation_error enum value to the / response property for the response status

    • warning

      added the new validation_error enum value to the / response property for the response status

    • warning

      added the new validation_error enum value to the / response property for the response status

    • warning

      added the new webhook_not_found enum value to the / response property for the response status

    • warning

      added the new webhook_not_found enum value to the / response property for the response status

    • warning

      added the new webhook_not_found enum value to the / response property for the response status

    • warning

      added the new webhook_not_found enum value to the / response property for the response status