> ## 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 Day-wise Overall Stats

> Get day-by-day email engagement breakdown with daily metrics

## Query Parameters

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

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

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

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

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

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

<RequestExample>
  ```bash cURL theme={null}
  curl "https://server.smartlead.ai/api/v1/analytics/day-wise-overall-stats?api_key=YOUR_KEY"
  ```

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

  API_KEY = "YOUR_API_KEY"

  response = requests.get(
      "https://server.smartlead.ai/api/v1/analytics/day-wise-overall-stats",
      params={"api_key": API_KEY}
  )

  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/day-wise-overall-stats?api_key=${API_KEY}`
  );

  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}
  {
    "ok": true,
    "data": {
      "day_wise_stats": [
        {
          "date": "2024-01-15",
          "sent": 150,
          "opened": 52,
          "replied": 8,
          "bounced": 2
        },
        {
          "date": "2024-01-16",
          "sent": 175,
          "opened": 61,
          "replied": 11,
          "bounced": 1
        }
      ]
    }
  }
  ```

  ```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>
  Shared rules (inclusive date boundaries, unique vs raw counts, rate formulas) are documented once in [How Analytics Metrics Are Calculated](/api-reference/analytics/how-metrics-are-calculated).
</Note>

This endpoint returns a daily breakdown where **each metric sits on its own event date**:

| Field                      | How it's calculated                                                                                                                             |
| -------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- |
| `sent`                     | Counted on the day the email was **sent**. Raw additive count.                                                                                  |
| `opened`                   | Counted on the day the **open happened**. Raw additive count (a lead opening twice counts twice).                                               |
| `replied`                  | Counted on the day the **reply arrived**. Raw additive count.                                                                                   |
| `bounced` / `unsubscribed` | Returned as `0` on this endpoint. For a daily bounce breakdown, use [Day-wise Stats by Sent Time](/api-reference/analytics/day-wise-sent-time). |

Because each metric is anchored to the day its own event occurred, an email sent on one day and the reply it generated on a later day land on **different rows**. If you want every metric attributed to the **send date** instead (so opens and replies line up with the day the email went out), use the [by sent time](/api-reference/analytics/day-wise-sent-time) variant.

All counts here are raw event counts, so they are additive across days. Dates are inclusive on both ends; a single date (start equal to end) returns that one full day.
