# Get Campaign Activity

> Summary, sparkline and a paginated feed of what a campaign did.

Requires an API key with the `read` scope.

One call for the campaign's activity page: lifetime summary counts and rates, a 30-day sparkline, why a paused or blocked campaign is not sending, and a paginated feed of sends, opens, clicks, replies and bounces, newest first by default. The feed is assembled from the sent-email log and the replies, so very large campaigns with a wide date range cost more than small ones; narrow with `type`, `step` or dates.

## Query Parameters

<ParamField query="type" type="string">Comma-separated event types: `sent`, `reply`, `open`, `bounce`, `click`, `error`.</ParamField>
<ParamField query="accountId" type="string">Only events from this sending account.</ParamField>
<ParamField query="step" type="string">Comma-separated step numbers, for example `1,2`.</ParamField>
<ParamField query="search" type="string">Match on the recipient or sender address, the subject, or the reply text.</ParamField>
<ParamField query="startDate" type="string">Earliest date, ISO 8601.</ParamField>
<ParamField query="endDate" type="string">Latest date, ISO 8601.</ParamField>
<ParamField query="sortBy" type="string">`timestamp` (default), `type`, `leadEmail` or `sequenceStep`.</ParamField>
<ParamField query="sortOrder" type="string">`desc` (default) or `asc`.</ParamField>
<ParamField query="page" type="integer" default="1">Page number.</ParamField>
<ParamField query="pageSize" type="integer" default="50">1 to 100.</ParamField>

## Path Parameters

<ParamField path="campaign_id" type="string" required>The campaign.</ParamField>

## Response

<ResponseField name="data" type="object">
  <Expandable title="Activity">
    <ResponseField name="summary" type="object">`sent`, `opened`, `clicked`, `bounced`, `replied` and the rates `openRate`, `replyRate`, `clickRate`, `bounceRate` in percent.</ResponseField>
    <ResponseField name="sparkline" type="object[]">30 days, one entry per UTC day: `date`, `sent`, `opened`, `replied`, `bounced`.</ResponseField>
    <ResponseField name="items" type="object[]">The feed page. Each has `id`, `type`, `timestamp`, `lead`, `account`, `sequenceStep`, `subject`, `bodyPreview`, `status`, `bounceType`, `errorMessage`, `openedAt`, `clickedAt`.</ResponseField>
    <ResponseField name="total" type="integer">Events matching the filters.</ResponseField>
    <ResponseField name="page" type="integer">This page.</ResponseField>
    <ResponseField name="pageSize" type="integer">Page size used.</ResponseField>
    <ResponseField name="pauseReason" type="object | null">Why a paused campaign paused: `reason`, `auto`, `timestamp`.</ResponseField>
    <ResponseField name="blockReason" type="object | null">Why an active campaign is sending nothing: `code`, `detail`, `at`.</ResponseField>
    <ResponseField name="breakerStatus" type="object | null">Set while the bounce breaker is holding the campaign.</ResponseField>
    <ResponseField name="completionReason" type="object | null">Set when the campaign completed because its leads were removed.</ResponseField>
  </Expandable>
</ResponseField>

<RequestExample>
```bash cURL
curl -X GET "https://api.foxreach.io/api/v1/campaigns/cmcamp1/activity?type=reply&pageSize=20" \
  -H "X-API-Key: otr_your_key"
```

```python Python SDK
from foxreach import FoxReach

client = FoxReach(api_key="otr_your_key")
activity = client.campaigns.activity("cmcamp1", type="reply", page_size=20)
```

```typescript TypeScript SDK
import { FoxReach } from "foxreach";

const client = new FoxReach({ apiKey: "otr_your_key" });
const activity = await client.campaigns.activity("cmcamp1", { type: "reply", pageSize: 20 });
```
</RequestExample>

<ResponseExample>
```json
{
  "data": {
    "summary": { "sent": 120, "opened": 66, "clicked": 4, "bounced": 2, "replied": 9, "openRate": 55.0, "replyRate": 7.5, "clickRate": 3.3, "bounceRate": 1.7 },
    "sparkline": [{ "date": "2026-11-04", "sent": 12, "opened": 6, "replied": 1, "bounced": 0 }],
    "items": [{ "id": "cmlog1", "type": "reply", "timestamp": "2026-11-04T09:12:00+00:00", "lead": { "id": "cmlead1", "email": "ann@example.com" }, "sequenceStep": null, "subject": "Re: Quick question" }],
    "total": 9,
    "page": 1,
    "pageSize": 20,
    "pauseReason": null,
    "blockReason": null,
    "breakerStatus": null,
    "completionReason": null
  }
}
```
</ResponseExample>

## Errors

| Status | Description |
|--------|-------------|
| `401` | Missing, invalid, revoked or expired API key |
| `403` | API key does not have the required scope: `read` |
| `404` | Campaign not found in this workspace |
| `422` | `pageSize` over 100 or `page` below 1 |

## Rate Limit

- **300 requests per minute, shared by every `read` call in your workspace.** Fixed 60-second window.
- Every response includes `X-RateLimit-Limit`, `X-RateLimit-Remaining`, `X-RateLimit-Reset` (unix epoch seconds) and `X-RateLimit-Bucket` (`read`).
- A `429` response includes a `Retry-After` header (seconds until the bucket resets).

For client-side patterns (`Retry-After`, exponential backoff, monitoring `X-RateLimit-Remaining`), see [Rate Limiting](/rate-limiting).
