# Get all campaigns statistics

## OpenAPI Specification

```yaml
openapi: 3.0.1
info:
  title: ''
  description: ''
  version: 1.0.0
paths:
  /campaign/stats/all:
    get:
      summary: Get all campaigns statistics
      deprecated: false
      description: >-
        Retrieves aggregated statistics across all campaigns within a workspace
        for a given date range.
      operationId: Analytics_analytics/get-aggregated-campaign-statistics
      tags:
        - Analytics
        - Analytics
      parameters:
        - name: workspace_id
          in: query
          description: The ID of the workspace for which campaign stats are retrieved.
          required: true
          schema:
            type: string
            description: The ID of the workspace for which campaign stats are retrieved.
            default: ''
            examples:
              - 65f3c92d3dbe5dbb35374a9a
        - name: start_date
          in: query
          description: The start date of the analytics period.
          required: true
          schema:
            type: string
            description: The start date of the analytics period.
            default: ''
            format: date-time
            examples:
              - '2024-01-01'
        - name: end_date
          in: query
          description: The end date of the analytics period.
          required: true
          schema:
            type: string
            description: The end date of the analytics period.
            default: ''
            format: date-time
            examples:
              - '2024-03-14'
        - name: x-api-key
          in: header
          description: |
            Your PlusVibe.ai account's API Key
          required: false
          example: ''
          schema:
            type: string
            description: |
              Your PlusVibe.ai account's API Key
            default: ''
            examples:
              - your-api-key
      responses:
        '200':
          description: Successfully retrieved aggregated campaign statistics.
          content:
            application/json:
              schema:
                type: object
                properties:
                  lead_count:
                    type: number
                    description: The total number of leads across all campaigns.
                    examples:
                      - 10265
                  completed_lead_count:
                    type: number
                    description: >-
                      The number of leads that have been successfully completed
                      since the launch of the campaign.
                    examples:
                      - 4522
                  lead_contacted_count:
                    type: number
                    description: >-
                      Total number of leads contacted within the given time
                      frame, including those previously engaged in earlier
                      steps.
                    examples:
                      - 8
                  new_completed_lead_count:
                    type: number
                    description: >-
                      The number of leads that have been successfully completed
                      during the given time frame.
                    examples:
                      - 8
                  new_lead_contacted_count:
                    type: number
                    description: >-
                      The number of unique leads contacted for the first time
                      within the given time frame.
                    examples:
                      - 0
                  sent_count:
                    type: number
                    description: The total number of emails sent in the campaign.
                    examples:
                      - 8
                  unique_opened_count:
                    type: number
                    description: The number of unique recipients who opened the campaign.
                    examples:
                      - 0
                  replied_count:
                    type: number
                    description: The number of recipients who replied to the campaign.
                    examples:
                      - 4
                  bounced_count:
                    type: number
                    description: The number of emails that bounced back from the campaign.
                    examples:
                      - 0
                  unsubscribed_count:
                    type: number
                    description: >-
                      The number of recipients who unsubscribed from the
                      campaign.
                    examples:
                      - 7
                  positive_reply_count:
                    type: number
                    description: >-
                      The number of recipients who replied positively to the
                      campaign.
                    examples:
                      - 3
                  opportunity_val:
                    type: number
                    description: The total value of opportunities from the campaign.
                    examples:
                      - 3
                  opportunity_val_per_count:
                    type: number
                    description: The value of opportunities per positive reply.
                    examples:
                      - 500
                x-apidog-orders:
                  - lead_count
                  - completed_lead_count
                  - lead_contacted_count
                  - new_completed_lead_count
                  - new_lead_contacted_count
                  - sent_count
                  - unique_opened_count
                  - replied_count
                  - bounced_count
                  - unsubscribed_count
                  - positive_reply_count
                  - opportunity_val
                  - opportunity_val_per_count
          headers: {}
          x-apidog-name: OK
        '400':
          description: Invalid request (e.g., missing parameters).
          content:
            application/json:
              schema:
                type: object
                properties: {}
                x-apidog-orders: []
          headers: {}
          x-apidog-name: Bad Request
        '500':
          description: Internal server error.
          content:
            application/json:
              schema:
                type: object
                properties: {}
                x-apidog-orders: []
          headers: {}
          x-apidog-name: Server Error
      security:
        - ApiKeyAuth: []
          x-apidog:
            schemeGroups:
              - id: uS5KiuC4wfZHK42AzOfA_
                schemeIds:
                  - ApiKeyAuth
            required: true
            use:
              id: uS5KiuC4wfZHK42AzOfA_
            scopes:
              uS5KiuC4wfZHK42AzOfA_:
                ApiKeyAuth: []
      x-apidog-folder: Analytics
      x-apidog-status: released
      x-run-in-apidog: https://app.apidog.com/web/project/929054/apis/api-17238024-run
components:
  schemas: {}
  securitySchemes:
    ApiKeyAuth:
      type: apikey
      in: header
      name: x-api-key
      description: |
        API key issued in the PlusVibe dashboard. The server reads it
        from the `x-api-key` header and injects it into the request as
        the `api_key` query parameter, which is why you will see
        `api_key` referenced in validation errors.
    apiKey:
      type: apikey
      in: body
      name: api_key
      description: API key passed in request body
servers:
  - url: https://api.plusvibe.ai/api/v1
    description: Prod Env
security:
  - ApiKeyAuth: []
    x-apidog:
      schemeGroups:
        - id: uS5KiuC4wfZHK42AzOfA_
          schemeIds:
            - ApiKeyAuth
      required: true
      use:
        id: uS5KiuC4wfZHK42AzOfA_
      scopes:
        uS5KiuC4wfZHK42AzOfA_:
          ApiKeyAuth: []

```
