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

# Get campaign analytics

> **Get aggregate KPIs and per-campaign analytics**

Returns workspace-wide KPIs (total campaigns, sends, average open/reply/bounce
rates) and a per-campaign breakdown.

## Filtering

- **status**: Restrict to campaigns in a specific status (DRAFT, ACTIVE, PAUSED,
  COMPLETED, FAILED)
- **from_date** / **to_date**: Restrict to campaigns launched within the given
  date range (ISO 8601, e.g. `2024-01-01`)

## Example

```python
import requests

response = requests.get(
    "https://api.coldsend.io/api/public/v1/analytics/campaigns",
    headers={"X-API-Key": "your-api-key"},
    params={"status": "COMPLETED", "from_date": "2024-01-01"}
)
print(response.json())
```



## OpenAPI

````yaml /public_openapi.json get /api/public/v1/analytics/campaigns
openapi: 3.0.3
info:
  title: ColdSend Public API
  description: >-
    Programmatic access to ColdSend for managing cold email campaigns and sender
    accounts.
  version: 1.0.0
  contact:
    name: ColdSend Support
    email: support@coldsend.pro
    url: https://coldsend.pro
servers:
  - url: https://api.coldsend.pro
    description: Production
security:
  - ApiKeyAuth: []
paths:
  /api/public/v1/analytics/campaigns:
    get:
      tags:
        - Analytics
      summary: Get campaign analytics
      description: >-
        **Get aggregate KPIs and per-campaign analytics**


        Returns workspace-wide KPIs (total campaigns, sends, average
        open/reply/bounce

        rates) and a per-campaign breakdown.


        ## Filtering


        - **status**: Restrict to campaigns in a specific status (DRAFT, ACTIVE,
        PAUSED,
          COMPLETED, FAILED)
        - **from_date** / **to_date**: Restrict to campaigns launched within the
        given
          date range (ISO 8601, e.g. `2024-01-01`)

        ## Example


        ```python

        import requests


        response = requests.get(
            "https://api.coldsend.io/api/public/v1/analytics/campaigns",
            headers={"X-API-Key": "your-api-key"},
            params={"status": "COMPLETED", "from_date": "2024-01-01"}
        )

        print(response.json())

        ```
      operationId: get_campaign_analytics_api_public_v1_analytics_campaigns_get
      parameters:
        - name: status
          in: query
          required: false
          schema:
            type: string
            nullable: true
            title: Status
            description: Filter by campaign status
          description: Filter by campaign status
        - name: from_date
          in: query
          required: false
          schema:
            type: string
            format: date
            nullable: true
            title: From Date
            description: Filter by launch date (on or after)
          description: Filter by launch date (on or after)
        - name: to_date
          in: query
          required: false
          schema:
            type: string
            format: date
            nullable: true
            title: To Date
            description: Filter by launch date (on or before)
          description: Filter by launch date (on or before)
      responses:
        '200':
          description: Analytics retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicCampaignAnalyticsResponse'
        '401':
          description: Missing or invalid API key
        '403':
          description: Insufficient permissions - requires 'campaigns:read' scope
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    PublicCampaignAnalyticsResponse:
      properties:
        success:
          type: boolean
          title: Success
          default: true
        message:
          type: string
          title: Message
          default: Analytics retrieved successfully
        kpis:
          $ref: '#/components/schemas/PublicCampaignKPIs'
          description: Aggregate KPIs
        campaigns:
          items:
            $ref: '#/components/schemas/PublicCampaignAnalyticsItem'
          type: array
          title: Campaigns
          description: Per-campaign breakdown
      type: object
      required:
        - kpis
        - campaigns
      title: PublicCampaignAnalyticsResponse
      description: Response for campaign analytics.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    PublicCampaignKPIs:
      properties:
        total_campaigns:
          type: integer
          title: Total Campaigns
          description: Total number of campaigns
        total_sends:
          type: integer
          title: Total Sends
          description: Total emails sent across all campaigns
        avg_open_rate:
          type: number
          title: Avg Open Rate
          description: Average open rate (%) across campaigns with sends
        avg_reply_rate:
          type: number
          title: Avg Reply Rate
          description: Average reply rate (%) across campaigns with sends
        avg_bounce_rate:
          type: number
          title: Avg Bounce Rate
          description: Average bounce rate (%) across campaigns with sends
        avg_verified_ctr:
          type: number
          nullable: true
          title: Avg Verified Ctr
          description: >-
            Average verified CTR (%) across campaigns with click tracking
            enabled
        total_verified_clicks:
          type: integer
          title: Total Verified Clicks
          description: Total verified (non-bot) clicks across all campaigns
          default: 0
      type: object
      required:
        - total_campaigns
        - total_sends
        - avg_open_rate
        - avg_reply_rate
        - avg_bounce_rate
      title: PublicCampaignKPIs
      description: Aggregate KPIs across all campaigns matching the filter.
    PublicCampaignAnalyticsItem:
      properties:
        campaign_id:
          type: string
          title: Campaign Id
          description: Campaign ID
        name:
          type: string
          title: Name
          description: Campaign name
        status:
          type: string
          title: Status
          description: Campaign status
        total_leads:
          type: integer
          title: Total Leads
          description: Total leads in the campaign
        sent_count:
          type: integer
          title: Sent Count
          description: Emails sent
        open_count:
          type: integer
          title: Open Count
          description: Emails opened
        reply_count:
          type: integer
          title: Reply Count
          description: Replies received
        bounce_count:
          type: integer
          title: Bounce Count
          description: Emails bounced
        unsubscribe_count:
          type: integer
          title: Unsubscribe Count
          description: Unsubscribes
        open_rate:
          type: number
          title: Open Rate
          description: Open rate (%)
        reply_rate:
          type: number
          title: Reply Rate
          description: Reply rate (%)
        bounce_rate:
          type: number
          title: Bounce Rate
          description: Bounce rate (%)
        enable_click_tracking:
          type: boolean
          title: Enable Click Tracking
          description: Whether click tracking is enabled for this campaign
          default: false
        click_count:
          type: integer
          nullable: true
          title: Click Count
          description: Total verified clicks (null if click tracking disabled)
        unique_clicking_leads:
          type: integer
          nullable: true
          title: Unique Clicking Leads
          description: >-
            Distinct leads with verified clicks (null if click tracking
            disabled)
        verified_ctr:
          type: number
          nullable: true
          title: Verified Ctr
          description: Verified CTR (%) (null if click tracking disabled)
        launched_at:
          type: string
          nullable: true
          title: Launched At
          description: Launch timestamp (ISO 8601)
        completed_at:
          type: string
          nullable: true
          title: Completed At
          description: Completion timestamp (ISO 8601)
      type: object
      required:
        - campaign_id
        - name
        - status
        - total_leads
        - sent_count
        - open_count
        - reply_count
        - bounce_count
        - unsubscribe_count
        - open_rate
        - reply_rate
        - bounce_rate
      title: PublicCampaignAnalyticsItem
      description: Per-campaign analytics row.
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
      description: API key with format cs_live_xxx

````