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

# Fetch Campaign Sequence Analytics

> Per-sequence and per-variant performance for a campaign, with rates.

<Note>
  Returns one entry per sequence step in the campaign, each with its own totals, calculated rates and a per-variant breakdown. This is the same data the campaign Analytics tab renders.
</Note>

## Path Parameters

<ParamField path="campaign_id" type="integer" required>
  The campaign ID
</ParamField>

## Query Parameters

<ParamField query="api_key" type="string" required>
  Your SmartLead API key
</ParamField>

<ParamField query="start_date" type="string" required>
  Start of the reporting window, ISO 8601 (e.g. `2026-09-01T00:00:00.000Z`).
</ParamField>

<ParamField query="end_date" type="string" required>
  End of the reporting window, ISO 8601 (e.g. `2026-09-30T23:59:59.999Z`).
</ParamField>

<ParamField query="time_zone" type="string">
  IANA timezone used to bucket the dates, e.g. `America/New_York`. Defaults to `UTC`.
</ParamField>

<RequestExample>
  ```bash cURL theme={null}
  curl "https://server.smartlead.ai/api/v1/campaigns/123/sequence-analytics?api_key=YOUR_KEY&start_date=2026-09-01T00:00:00.000Z&end_date=2026-09-30T23:59:59.999Z&time_zone=UTC"
  ```

  ```python Python theme={null}
  import requests

  API_KEY = "YOUR_API_KEY"
  campaign_id = 123

  response = requests.get(
      f"https://server.smartlead.ai/api/v1/campaigns/{campaign_id}/sequence-analytics",
      params={
          "api_key": API_KEY,
          "start_date": "2026-09-01T00:00:00.000Z",
          "end_date": "2026-09-30T23:59:59.999Z",
          "time_zone": "UTC",
      },
  )
  response.raise_for_status()

  for sequence in response.json()["data"]["sequences"]:
      stats = sequence["total_stats"]
      print(f"step {sequence['seq_number']}: sent {stats['sent_count']}, "
            f"open {stats['open_percentage']}%, reply {stats['reply_percentage']}%")
  ```

  ```javascript JavaScript theme={null}
  const API_KEY = 'YOUR_API_KEY';
  const campaignId = 123;

  const params = new URLSearchParams({
    api_key: API_KEY,
    start_date: '2026-09-01T00:00:00.000Z',
    end_date: '2026-09-30T23:59:59.999Z',
    time_zone: 'UTC',
  });

  const response = await fetch(
    `https://server.smartlead.ai/api/v1/campaigns/${campaignId}/sequence-analytics?${params}`
  );

  const { data } = await response.json();
  data.sequences.forEach((s) => {
    console.log(s.seq_number, s.total_stats.sent_count, s.total_stats.reply_percentage);
  });
  ```
</RequestExample>

## Response Fields

<ResponseField name="data" type="object">
  <Expandable title="properties">
    <ResponseField name="campaign_id" type="number">
      The campaign these sequences belong to.
    </ResponseField>

    <ResponseField name="sequences" type="array">
      One entry per sequence step, ordered by step number.

      <Expandable title="properties">
        <ResponseField name="id" type="number">
          Sequence step ID. `email_campaign_seq_id` carries the same value.
        </ResponseField>

        <ResponseField name="seq_number" type="number">
          Position of this step in the sequence, starting at 1.
        </ResponseField>

        <ResponseField name="seq_type" type="string">
          Step type, e.g. `EMAIL`.
        </ResponseField>

        <ResponseField name="seq_schedule_type" type="string">
          When the step sends, e.g. `IMMEDIATE`.
        </ResponseField>

        <ResponseField name="subject_line" type="string | null">
          Subject configured on the step. `null` on follow-ups that inherit the thread subject.
        </ResponseField>

        <ResponseField name="seq_title" type="null">
          Reserved; not currently stored.
        </ResponseField>

        <ResponseField name="engagement_level" type="string">
          Derived label for the step's open rate and volume.
        </ResponseField>

        <ResponseField name="total_stats" type="object">
          Totals across every variant of the step: `sent_count`, `open_count`, `click_count`, `reply_count`, `bounce_count`, `sender_bounce_count`, `unsubscribed_count`, `skipped_count`, `positive_reply_count`, plus `open_percentage`, `click_percentage`, `reply_percentage` and `bounce_percentage`.
        </ResponseField>

        <ResponseField name="variants" type="array">
          Per-variant breakdown. Each entry carries `id`, `variant_label`, `is_baseline`, `created_at`, `change_description` and a `stats` object with the same counters as `total_stats`.
        </ResponseField>

        <ResponseField name="linkedin_stats" type="object | null">
          LinkedIn counters for LinkedIn steps, otherwise `null`.
        </ResponseField>

        <ResponseField name="manual_step_stats" type="object | null">
          Counters for manual steps, otherwise `null`.
        </ResponseField>
      </Expandable>
    </ResponseField>
  </Expandable>
</ResponseField>

## Response Codes

<ResponseField name="200" type="Success">
  Request successful.
</ResponseField>

<ResponseField name="400" type="Bad Request">
  Missing or malformed `start_date` / `end_date`.
</ResponseField>

<ResponseField name="401" type="Unauthorized">
  Invalid or missing API key.
</ResponseField>

<ResponseField name="404" type="Not Found">
  The campaign does not exist or you don't have access to it.
</ResponseField>

<ResponseExample>
  ```json 200 - Success theme={null}
  {
    "ok": true,
    "data": {
      "campaign_id": 123,
      "sequences": [
        {
          "id": 4567,
          "email_campaign_seq_id": 4567,
          "seq_number": 1,
          "seq_type": "EMAIL",
          "seq_schedule_type": "IMMEDIATE",
          "subject_line": "Quick question about {{company_name}}",
          "seq_title": null,
          "total_stats": {
            "sent_count": 1240,
            "open_count": 372,
            "click_count": 89,
            "reply_count": 23,
            "bounce_count": 18,
            "sender_bounce_count": 3,
            "unsubscribed_count": 4,
            "skipped_count": 0,
            "positive_reply_count": 9,
            "open_percentage": 30,
            "click_percentage": 7.18,
            "reply_percentage": 1.85,
            "bounce_percentage": 1.45
          },
          "engagement_level": "high",
          "variants": [
            {
              "id": 8901,
              "variant_label": "A",
              "is_baseline": true,
              "created_at": "2026-09-01T10:15:00.000Z",
              "change_description": null,
              "stats": {
                "sent_count": 620,
                "open_count": 200,
                "open_percentage": 32.26,
                "click_count": 50,
                "click_percentage": 8.06,
                "reply_count": 14,
                "reply_percentage": 2.26,
                "bounce_count": 9,
                "sender_bounce_count": 1,
                "bounce_percentage": 1.45,
                "unsubscribed_count": 2,
                "positive_reply_count": 6
              }
            }
          ],
          "linkedin_stats": null,
          "manual_step_stats": null
        }
      ]
    }
  }
  ```

  ```json 401 - Unauthorized theme={null}
  {
    "message": "Invalid API Key"
  }
  ```

  ```json 404 - Not Found theme={null}
  {
    "error": "Campaign not found - Invalid campaign_id."
  }
  ```
</ResponseExample>

## Related Endpoints

* [Fetch Campaign Statistics by Campaign ID](/api-reference/campaign-statistics/get-by-id) - campaign statistics
* [Get Campaign Analytics](/api-reference/campaigns/get-analytics) - whole-campaign totals
