Skip to content

Metrics

The Mailgun Metrics API provides programmatic access to detailed analytics data about your email sending activity. This API allows you to query, filter, and analyze email performance metrics to gain insights into deliverability, engagement, and overall sending health.

Metrics vs. Stats API

The Metrics API is the modern replacement for the deprecated Stats API:

FeatureStats API (Deprecated)Metrics API (Current)
FlexibilityLimited filteringAdvanced filtering with logical operators
DimensionsFixed groupingsFlexible dimension combinations
MetricsBasic countsComprehensive metrics including rates
PerformanceSlowerOptimized for large datasets
Future SupportNoneActive development

Migration: If you're using the Stats API, plan to migrate to the Metrics API for continued support and new features.