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

# GET /v1/campaigns/:id/stats — Read Campaign Metrics

> GET /v1/campaigns/:id/stats — Returns delivery, reply, bounce, and queue metrics for a specific campaign. Metrics are updated in near real-time.

Use this endpoint to pull performance metrics for any campaign in your workspace. The response includes counters for every major delivery event — sent, delivered, bounced, and replied — as well as the current queue depth and computed rates. Metrics are updated in near real-time, making this endpoint suitable for polling from dashboards or agent workflows that need live visibility into campaign health.

```bash theme={null}
GET /v1/campaigns/:id/stats
```

## Authorization

All requests must include a Bearer token in the `Authorization` header. You can find your API key in the Leadterra dashboard under **Settings → API Keys**.

## Path Parameters

<ParamField path="id" type="string" required>
  The unique ID of the campaign whose metrics you want to retrieve. You receive this ID when you [create a campaign](/api-reference/campaigns-create). Example: `camp_123`.
</ParamField>

## Request Body

This endpoint accepts no request body.

## Example Request

```bash theme={null}
curl --request GET \
  --url https://app.leadterra.co/v1/campaigns/camp_123/stats \
  --header "Authorization: Bearer sk_live_YOUR_KEY" \
  --header "Content-Type: application/json"
```

## Response Fields

<ResponseField name="campaignId" type="string">
  The ID of the campaign these metrics belong to.
</ResponseField>

<ResponseField name="totalEnrolled" type="integer">
  Total number of leads enrolled in the campaign, regardless of their current send state.
</ResponseField>

<ResponseField name="sent" type="integer">
  Number of emails that have been submitted for delivery. Includes emails regardless of delivery outcome.
</ResponseField>

<ResponseField name="delivered" type="integer">
  Number of emails confirmed as accepted by the recipient's mail server. Does not imply the email reached the inbox.
</ResponseField>

<ResponseField name="bounced" type="integer">
  Number of emails that resulted in a hard or soft bounce. Leads that trigger a hard bounce are automatically suppressed from future sends.
</ResponseField>

<ResponseField name="replied" type="integer">
  Number of leads who have sent at least one reply to any step in the sequence. Leads with a reply are automatically removed from further sequence steps.
</ResponseField>

<ResponseField name="queued" type="integer">
  Number of emails currently waiting in the send queue. A non-zero value while the campaign is `paused` indicates held messages that will resume on restart.
</ResponseField>

<ResponseField name="openRate" type="float">
  Ratio of unique opens to delivered emails, expressed as a decimal between `0` and `1`. For example, `0.42` represents a 42 % open rate.
</ResponseField>

<ResponseField name="replyRate" type="float">
  Ratio of replied leads to delivered emails, expressed as a decimal between `0` and `1`. For example, `0.08` represents an 8 % reply rate.
</ResponseField>

## Example Response

```json theme={null}
{
  "campaignId": "camp_123",
  "totalEnrolled": 500,
  "sent": 480,
  "delivered": 471,
  "bounced": 9,
  "replied": 38,
  "queued": 20,
  "openRate": 0.42,
  "replyRate": 0.08
}
```

## Error Codes

| HTTP Status        | Code                    | Meaning                                                                  |
| ------------------ | ----------------------- | ------------------------------------------------------------------------ |
| `400 Bad Request`  | `invalid_request`       | The request was malformed or contained unexpected parameters.            |
| `401 Unauthorized` | `authentication_failed` | The `Authorization` header is missing, malformed, or the key is invalid. |
| `404 Not Found`    | `campaign_not_found`    | No campaign with the given `id` exists in your workspace.                |
