Metrics

Query event volume, delivery success rates, and latency percentiles.

The metrics API provides aggregated analytics for your webhook traffic. It uses a hybrid approach: queries within the last 48 hours run against raw event data for instant accuracy, while older queries use Cron-driven pre-aggregated hourly and daily rollups for bounded performance.

Metrics can be aggregated by hour or day granularity. The after and before parameters accept ISO 8601 timestamps. If omitted, most endpoints default to the last 24 hours with hourly intervals.

Overview

GET /v1/metrics/overview

Get summary stats: today's events, deliveries, success rate, and active resource counts.

Authentication: API key or session cookie.

bash
curl https://hookstream.io/v1/metrics/overview \ -H "X-API-Key: $HOOKSTREAM_API_KEY"
json
{ "events_today": 1542, "events_this_week": 15420, "active_sources": 5, "deliveries_today": 1493, "success_today": 1470, "failed_today": 23, "success_rate_today": 98.46, "dlq_count": 3, "active_destinations": 8, "open_issues": 2, "active_collections": 4 }

Volume

GET /v1/metrics/volume

Get event volume over time grouped by granularity.

Authentication: API key or session cookie.

Query Parameters

after string

ISO 8601 start time.

before string

ISO 8601 end time.

source_id string

Filter by source ID.

granularity string default: hour

Aggregation granularity: hour or day.

json
{ "series": [ { "bucket": "2026-03-01T00:00:00Z", "source_id": "src_a1b2...", "event_count": 342, "source_name": "Stripe Webhooks" }, { "bucket": "2026-03-01T01:00:00Z", "source_id": "src_a1b2...", "event_count": 289, "source_name": "Stripe Webhooks" } ], "granularity": "hour" }

Deliveries

GET /v1/metrics/deliveries

Get delivery success/failure breakdown over time.

Authentication: API key or session cookie.

Query Parameters

after string

ISO 8601 start time.

before string

ISO 8601 end time.

Filter by destination ID.

granularity string default: hour

Aggregation granularity: hour or day.

json
{ "series": [ { "bucket": "2026-03-01T00:00:00Z", "destination_id": "dst_b2c3...", "destination_name": "Backend API", "delivery_count": 342, "success_count": 330, "failed_count": 12, "avg_latency_ms": 45 } ], "granularity": "hour" }

Latency

GET /v1/metrics/latency

Get delivery latency percentiles (p50, p95, p99) over time.

Authentication: API key or session cookie.

Query Parameters

after string

ISO 8601 start time.

before string

ISO 8601 end time.

Filter by destination ID.

json
{ "series": [ { "bucket": "2026-03-01T00:00:00Z", "destination_id": "dst_b2c3...", "destination_name": "Backend API", "p50_latency_ms": 45, "p95_latency_ms": 230, "p99_latency_ms": 890, "avg_latency_ms": 127 } ] }
Ask a question... ⌘I