Skip to main content
GET
/
metrics
/
volume
Retrieve Volume Metrics
curl --request GET \
  --url https://api.mailchannels.net/tx/v1/metrics/volume \
  --header 'X-Api-Key: <x-api-key>'
{
  "buckets": {
    "delivered": [
      {
        "count": 1,
        "period_start": "2023-11-07T05:31:56Z"
      }
    ],
    "dropped": [
      {
        "count": 1,
        "period_start": "2023-11-07T05:31:56Z"
      }
    ],
    "processed": [
      {
        "count": 1,
        "period_start": "2023-11-07T05:31:56Z"
      }
    ]
  },
  "delivered": 1,
  "dropped": 1,
  "processed": 1,
  "end_time": "2023-11-07T05:31:56Z",
  "start_time": "2023-11-07T05:31:56Z"
}

Headers

X-Api-Key
string
required

Query Parameters

start_time
string

The beginning of the time range for retrieving message volume metrics (inclusive). Formats: YYYY-MM-DD or YYYY-MM-DDTHH:MM:SSZ. Defaults to one month ago if not provided.

end_time
string

The end of the time range for retrieving message volume metrics (exclusive). Formats: YYYY-MM-DD or YYYY-MM-DDTHH:MM:SSZ. Defaults to the current time if not provided.

campaign_id
string

The ID of the campaign to filter metrics by. If not provided, metrics for all campaigns will be returned.

interval
enum<string>
default:day

The interval for aggregating metrics data. Allowed values:

  • hour: Hourly breakdown
  • day: Daily breakdown (default)
  • week: Weekly breakdown
  • month: Monthly breakdown
Available options:
hour,
day,
week,
month

Response

Successfully retrieved volume metrics

buckets
object
required

A series of metrics aggregations bucketed by time interval (e.g. hour, day)

delivered
integer
required

Count of messages delivered during the specified time range.

Required range: x >= 0
dropped
integer
required

Count of messages dropped during the specified time range.

Required range: x >= 0
processed
integer
required

Count of messages processed during the specified time range.

Required range: x >= 0
end_time
string<date-time>

The end of the time range for retrieving message volume metrics (exclusive).

start_time
string<date-time>

The beginning of the time range for retrieving message volume metrics (inclusive).