---
title: "Metrics time series"
method: GET
path: "/v1/metrics"
tags: ["Usage"]
---

# Metrics time series

`GET /v1/metrics`

## Request

- Base URL: `https://api.deadsimple.email`
- URL: `https://api.deadsimple.email/v1/metrics`
- Auth: HTTP bearer

Activity bucketed into fixed UTC intervals: messages sent and received, bounces, complaints, first opens and first clicks of tracked sends, webhook deliveries and terminal failures, and inbound messages the prompt-injection scanner flagged (medium or high). Derived live from the account's rows; outcomes are attributed to messages created inside the window, and opens/clicks count once per message. Requires `usage.read`. Honours workspace scoping and inbox-scoped API keys.

## Query parameters

- `from` string
- `to` string
- `interval` 'day' | 'hour'
- `inbox_id` string

## Headers

- `X-Workspace-Id` string, uuid

## Response `200`

Bucketed series plus totals over the whole window

- Metrics
  - `interval` 'day' | 'hour'
  - `from` string, date-time
  - `to` string, date-time
  - `series` MetricsBucket[]
    - `start` string, date-time: Bucket start, UTC.
    - `sent` integer
    - `received` integer
    - `bounced` integer
    - `complained` integer
    - `opened` integer: Messages opened for the first time in this bucket (tracked sends only).
    - `clicked` integer: Messages whose first link click fell in this bucket (tracked sends only).
    - `webhook_deliveries` integer: Webhook deliveries that reached the endpoint.
    - `webhook_failures` integer: Deliveries that exhausted their retry budget.
    - `injection_flagged` integer: Inbound messages rated medium or high by the prompt-injection scanner.
  - `totals` MetricsBucket
    - `start` string, date-time: Bucket start, UTC.
    - `sent` integer
    - `received` integer
    - `bounced` integer
    - `complained` integer
    - `opened` integer: Messages opened for the first time in this bucket (tracked sends only).
    - `clicked` integer: Messages whose first link click fell in this bucket (tracked sends only).
    - `webhook_deliveries` integer: Webhook deliveries that reached the endpoint.
    - `webhook_failures` integer: Deliveries that exhausted their retry budget.
    - `injection_flagged` integer: Inbound messages rated medium or high by the prompt-injection scanner.

## Other responses

- `400`: Bad window (from after to, over 92 days, hour over 7 days, unparseable date) or interval
- `404`: An inbox in `inbox_id` is not visible to this key

---

[API](https://skmtc.dev/deadsimple/apis/dead-simple-email-api.md) · [All operations](https://skmtc.dev/deadsimple/apis/dead-simple-email-api/llms.txt) · [OpenAPI document](https://skmtc.dev/deadsimple/apis/dead-simple-email-api/revisions/c697881be131?raw)
