---
title: "Get Campaign Metrics"
method: GET
path: "/api/v1/campaigns/{campaign_id}/metrics"
tags: ["Campaigns"]
---

# Get Campaign Metrics

`GET /api/v1/campaigns/{campaign_id}/metrics`

## Request

- Base URL: `http://localhost:3009`
- URL: `http://localhost:3009/api/v1/campaigns/{campaign_id}/metrics`
- Auth: HTTP bearer

Returns aggregate campaign performance — leads, emails sent, opens, replies, bounces and their rates — plus a send trend bucketed over time. Use `days` (or `from`/`to`) and `granularity` to shape the trend window.

## Path parameters

- `campaign_id` string, required

## Query parameters

- `granularity` 'hour' | 'day'
- `tz` string
- `days` string
- `from` string
- `to` string

## Response `200`

Default Response

- object
  - `status` integer
  - `data` CampaignMetrics: Aggregate campaign performance. Counts are derived on read from the per-step records.
    - `leads` integer: Total leads in the campaign
    - `leads_sent` integer: Leads that have received at least one email
    - `emails_sent` integer
    - `opened` integer
    - `replied` integer
    - `positive` integer: Replies classified as positive. **Not populated yet** — no reply classifier exists, so this is always 0.
    - `bounced` integer
    - `open_rate` number
    - `reply_rate` number
    - `positive_reply_rate` number: Always 0 until reply classification ships — see `positive`. Do not build on it yet.
    - `bounce_rate` number
    - `by_status` object: Lead counts keyed by lead status
    - `trend` object: Sends bucketed over time: `{ granularity, tz, buckets: [{ bucket, sent }] }`

## Other responses

- `401`: Unauthorized — missing or invalid API key
- `403`: Forbidden. `code` says which permission refused: ROLE_FORBIDDEN (your role), INSUFFICIENT_SCOPE (the API key's scopes), WORKFLOW_FORBIDDEN (no access to the workflow), KEY_WORKFLOW_FORBIDDEN (the API key's workflow restriction).
- `404`: Campaign not found
- `429`: Too Many Requests — rate limit exceeded. Check `Retry-After` header for seconds until the limit resets.

---

[API](https://skmtc.dev/floqer/apis/floqer-public-api.md) - [All operations](https://skmtc.dev/floqer/apis/floqer-public-api/llms.txt) - [OpenAPI document](https://skmtc.dev/floqer/apis/floqer-public-api/revisions/fce50dc07b20?raw)
