> ## Documentation Index
> Fetch the complete documentation index at: https://docs.sequenzy.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Campaign Metrics

> Retrieve engagement metrics for a specific campaign.

Returns engagement metrics (sends, deliveries, bounces, opens, clicks, unsubscribes) plus attributed conversions and revenue for a single campaign. Optionally filter by time period. Test sends are excluded from these performance metrics and attributed revenue by default so previews do not skew results, but they still count toward send usage and quota. Open and click metrics also exclude detected email-security scanners and tracked brand assets by default.

`GET /api/v1/campaigns/{campaignId}/stats` is kept as a backward-compatible alias for this endpoint.

## Path Parameters

<ParamField path="campaignId" type="string" required>
  The ID of the campaign.
</ParamField>

## Query Parameters

<ParamField query="period" type="string">
  Sliding time window. One of: `1h`, `24h`, `7d`, `30d`, `90d`. Ignored when
  `start` and `end` are provided.
</ParamField>

<ParamField query="start" type="string">
  Start of custom time range (ISO 8601). Must be used with `end`.
</ParamField>

<ParamField query="end" type="string">
  End of custom time range (ISO 8601). Must be used with `start`. Max range: 90
  days.
</ParamField>

<ParamField query="includeMachineEngagement" type="boolean" default="false">
  Set to `true` to include detected scanner, preview, and tracked asset
  open/click events in engagement metrics.
</ParamField>

## Response Fields

| Field             | Type     | Description                                                                                     |
| ----------------- | -------- | ----------------------------------------------------------------------------------------------- |
| `sent`            | `number` | Emails sent in the period                                                                       |
| `delivered`       | `number` | Emails delivered                                                                                |
| `bounced`         | `number` | Emails that bounced                                                                             |
| `opened`          | `number` | Unique opens                                                                                    |
| `clicked`         | `number` | Unique clicks                                                                                   |
| `unsubscribed`    | `number` | Unsubscribes                                                                                    |
| `deliveryRate`    | `number` | Delivery rate percentage                                                                        |
| `bounceRate`      | `number` | Bounce rate percentage                                                                          |
| `openRate`        | `number` | Open rate percentage                                                                            |
| `clickRate`       | `number` | Click rate percentage                                                                           |
| `unsubscribeRate` | `number` | Unsubscribe rate percentage                                                                     |
| `conversions`     | `number` | Goal conversions attributed to this campaign (last-touch, 24h window)                           |
| `revenueCents`    | `number` | Attributed revenue in cents from purchase events (`saas.purchase` and `ecommerce.order_placed`) |

## Common Queries

### How did our February newsletter perform?

```bash theme={null}
curl "https://api.sequenzy.com/api/v1/metrics/campaigns/camp_abc123" \
 -H "Authorization: Bearer YOUR_API_KEY"
```

Without time filters, you get lifetime metrics for the campaign.

### How many opens in the first 24 hours after send?

```bash theme={null}
curl "https://api.sequenzy.com/api/v1/metrics/campaigns/camp_abc123?period=24h" \
 -H "Authorization: Bearer YOUR_API_KEY"
```

Useful to gauge initial engagement before the campaign matures.

### Compare campaign performance over a specific week

```bash theme={null}
curl "https://api.sequenzy.com/api/v1/metrics/campaigns/camp_abc123?start=2026-02-01T00:00:00Z&end=2026-02-08T00:00:00Z" \
 -H "Authorization: Bearer YOUR_API_KEY"
```

### Who opened or clicked in this campaign?

Use the [Get Recipients](/api-reference/analytics/recipients) endpoint with a `campaignId` filter to see individual recipient engagement:

```bash theme={null}
curl "https://api.sequenzy.com/api/v1/metrics/recipients?campaignId=camp_abc123" \
 -H "Authorization: Bearer YOUR_API_KEY"
```

## Responses

<ResponseExample>
  ```json 200 theme={null}
  {
    "success": true,
    "campaignId": "camp_abc123",
    "stats": {
      "sent": 1200,
      "delivered": 1190,
      "bounced": 10,
      "opened": 420,
      "clicked": 85,
      "unsubscribed": 2,
      "deliveryRate": 99.17,
      "bounceRate": 0.83,
      "openRate": 35.29,
      "clickRate": 7.14,
      "unsubscribeRate": 0.17,
      "conversions": 12,
      "revenueCents": 84500
    }
  }
  ```

  ```json 400 theme={null}
  {
    "success": false,
    "error": "Invalid period. Must be one of: 1h, 24h, 7d, 30d, 90d"
  }
  ```

  ```json 401 theme={null}
  { "success": false, "error": "Unauthorized" }
  ```

  ```json 404 theme={null}
  { "success": false, "error": "Campaign not found" }
  ```

  ```json 500 theme={null}
  { "success": false, "error": "Internal server error" }
  ```
</ResponseExample>
