> ## 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.

# Get Overall Analytics

> Get account-wide overall statistics for date range with sent, opened, replied metrics

## Path Parameters

<Note>No path parameters</Note>

## Query Parameters

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

<ParamField query="start_date" type="string" required>
  Start date in YYYY-MM-DD format
</ParamField>

<ParamField query="end_date" type="string" required>
  End date in YYYY-MM-DD format
</ParamField>

<ParamField query="timezone" type="string">
  Timezone string (e.g. "America/New\_York"), optional
</ParamField>

<ParamField query="client_ids" type="string">
  Comma-separated client IDs (optional)
</ParamField>

<ParamField query="campaign_ids" type="string">
  Comma-separated campaign IDs (optional)
</ParamField>

<ParamField query="is_agency" type="string">
  Set to "true" to filter for agency accounts (optional)
</ParamField>

<ParamField query="full_data" type="string">
  Set to "true" to return full data set (optional)
</ParamField>

## Request Body

<Note>No request body required</Note>

<RequestExample>
  ```bash cURL theme={null}
  curl "https://server.smartlead.ai/api/v1/analytics/overall-stats-v2?api_key=YOUR_KEY&start_date=2024-01-01&end_date=2024-01-31&timezone=America%2FNew_York"
  ```

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

  API_KEY = "YOUR_API_KEY"

  response = requests.get(
      "https://server.smartlead.ai/api/v1/analytics/overall-stats-v2",
      params={
          "api_key": API_KEY,
          "start_date": "2024-01-01",
          "end_date": "2024-01-31",
          "timezone": "America/New_York"
      }
  )

  result = response.json()
  print(result)
  ```

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

  const response = await fetch(
    `https://server.smartlead.ai/api/v1/analytics/overall-stats-v2?api_key=${API_KEY}&start_date=2024-01-01&end_date=2024-01-31&timezone=America%2FNew_York`
  );

  const result = await response.json();
  console.log(result);
  ```
</RequestExample>

## Response Codes

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

<ResponseField name="400" type="Bad Request">
  Invalid request parameters or malformed request body
</ResponseField>

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

<ResponseField name="404" type="Not Found">
  The requested resource (campaign, lead, email account, etc.) does not exist or you don't have access to it
</ResponseField>

<ResponseField name="422" type="Validation Error">
  Request validation failed. Check parameter types, required fields, and value constraints.
</ResponseField>

<ResponseField name="429" type="Rate Limit Exceeded">
  Too many requests. Please slow down and retry after the rate limit resets.
</ResponseField>

<ResponseField name="500" type="Internal Server Error">
  Server error occurred. Please try again or contact support if the issue persists.
</ResponseField>

<ResponseField name="503" type="Service Unavailable">
  API is temporarily unavailable or under maintenance. Please try again later.
</ResponseField>

<ResponseExample>
  ```json 200 - Success theme={null}
  {
    "success": true,
    "message": "Overall Stats fetched successfully!",
    "data": {
      "overall_stats": {
        "sent": "345805",
        "opened": "0",
        "replied": "1732",
        "bounced": "2015",
        "unique_lead_count": "299503",
        "unique_open_count": "0",
        "positive_replied": 280,
        "open_rate": "0.00%",
        "reply_rate": "0.58%",
        "positive_reply_rate": "16.17%",
        "bounce_rate": "0.67%"
      }
    }
  }
  ```

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

  ```json 404 - Not Found theme={null}
  {
    "error": "Resource not found"
  }
  ```

  ```json 422 - Validation Error theme={null}
  {
    "error": "Invalid parameters provided"
  }
  ```
</ResponseExample>

## How these metrics are calculated

<Note>
  The rules below (inclusive date boundaries, unique vs raw counts, the rate formulas, and how positive replies are counted) are shared across every Global Analytics endpoint. See [How Analytics Metrics Are Calculated](/api-reference/analytics/how-metrics-are-calculated) for the full explanation.
</Note>

The fields in `overall_stats` are not all the same kind of number. Some are raw event counts and some are unique (deduplicated) counts, and this affects how they behave across date ranges.

### Field definitions

<ResponseField name="sent" type="number">
  Total emails sent in the range. Raw event count.
</ResponseField>

<ResponseField name="opened" type="number">
  Total open events in the range. Raw event count (a single lead opening twice counts twice).
</ResponseField>

<ResponseField name="replied" type="number">
  Total reply events in the range. Raw event count.
</ResponseField>

<ResponseField name="bounced" type="number">
  Total bounce events in the range. Raw event count.
</ResponseField>

<ResponseField name="unique_lead_count" type="number">
  Count of **distinct leads** that were sent at least one email in the range, deduplicated per campaign by email address. This is `COUNT(DISTINCT lead)` across the whole range, **not** a sum of per-day values.
</ResponseField>

<ResponseField name="unique_open_count" type="number">
  Count of **distinct leads** that opened at least one email in the range. Like `unique_lead_count`, this is deduplicated across the whole range.
</ResponseField>

<ResponseField name="positive_replied" type="number">
  Count of **distinct leads tagged as positive** (`sentiment_type = 'positive'`) that sent a genuine reply (replied, not ignored, not bounced), attributed to the **date the reply was received**, within the range. Because it's a distinct-lead count deduplicated across the range, it is **not additive** — summing per-day calls over-counts. The lead category is mutable, so re-categorising a lead changes historical counts.
</ResponseField>

### Rates

All rates are computed against the unique counts above, not against raw sends:

| Rate | Formula |
| - | - |
| `open_rate` | `unique_open_count / unique_lead_count` |
| `reply_rate` | `replied / unique_open_count` (falls back to `unique_lead_count` when open tracking is disabled, e.g. plain-text sends) |
| `positive_reply_rate` | `positive_replied / replied` |
| `bounce_rate` | `bounced / unique_lead_count` |

<Note>
  `bounce_rate` is reported per unique lead (`bounced / unique_lead_count`), not per email sent. If you need the deliverability-style figure (`bounced / sent`), both `bounced` and `sent` are in the response and you can compute it yourself.
</Note>

### Date range behaviour (important)

`start_date` and `end_date` are **inclusive on both ends** (from `00:00:00` to `23:59:59` in the requested timezone), and they filter on the time the email was **sent**.

Because the unique counts are deduplicated across the entire requested range, **you cannot reconstruct a multi-day range by summing per-day responses**:

* `sent`, `opened`, `replied` and `bounced` are additive — summing three single-day responses equals the 3-day range response.
* `unique_lead_count` and `unique_open_count` are **not** additive. A lead emailed on two different days counts once in a range query, but once in each single-day query — so summing days inflates the unique totals (and every rate derived from them).

For an accurate figure over any period, query that period directly rather than summing individual days.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.