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

# Campaign Analytics

> Returns paginated campaign analytics for a specific campaign and date range.



## OpenAPI

````yaml GET /v2/campaign-analytics/{campaign_id}/
openapi: 3.1.0
info:
  title: CloserX.ai API
  description: >-
    The CloserX.ai API provides programmatic access to manage AI-powered calling
    operations, including agent creation, campaign management, contact handling,
    telephony integration, and more. This API enables seamless automation and
    integration with CRM systems, telephony providers, and other third-party
    services for enhanced client communication and business operations.
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://app.closerx.ai/api
security:
  - api_key: []
paths:
  /v2/campaign-analytics/{campaign_id}/:
    get:
      summary: Get campaign analytics by date
      description: >-
        Returns paginated campaign analytics for a specific campaign and date
        range.
      parameters:
        - name: campaign_id
          in: path
          required: true
          description: Unique campaign ID (e.g., campc005bf8a)
          schema:
            type: string
        - name: Company-Name
          in: header
          description: The name of the schema to be used for the request
          required: true
          schema:
            type: string
        - name: page
          in: query
          required: false
          schema:
            type: integer
          description: Page number for pagination
        - name: sort_by
          in: query
          required: false
          schema:
            type: string
          description: Sort the results by a specific field
        - name: search
          in: query
          required: false
          schema:
            type: string
          description: Search term for filtering
        - name: outcome
          in: query
          required: false
          schema:
            type: string
          description: Filter by outcome of the campaign
        - name: date
          in: query
          required: false
          schema:
            type: string
            format: date
          description: Specific date for which data is required
        - name: from_date
          in: query
          required: false
          schema:
            type: string
            format: date
          description: Start date for range filtering
        - name: to_date
          in: query
          required: false
          schema:
            type: string
            format: date
          description: End date for range filtering
      responses:
        '200':
          description: Campaign analytics data response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CampaignAnalytics'
        '400':
          description: Invalid request or input
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    CampaignAnalytics:
      type: object
      properties:
        total_count:
          type: integer
          description: Total number of analytics records
          example: 1
        total_page:
          type: integer
          description: Total number of pages
          example: 1
        current_page_no:
          type: integer
          description: Current page number
          example: 1
        next_page_number:
          type:
            - integer
            - 'null'
          description: Next page number if available
          example: null
        previous_page_number:
          type:
            - integer
            - 'null'
          description: Previous page number if available
          example: null
        page_size:
          type: integer
          description: Number of records per page
          example: 10
        data:
          type: array
          description: List of campaign analytics data
          items:
            type: object
            properties:
              id:
                type: integer
                example: 5157
              calling_number:
                type: string
                example: '+911149816890'
              sid:
                type: string
                example: call_4be2700848d9cf0cbcb525393d8
              contact_id:
                type:
                  - string
                  - 'null'
                example: null
              contact_number:
                type: string
                example: '+918570904784'
              email:
                type:
                  - string
                  - 'null'
                example: null
              first_name:
                type:
                  - string
                  - 'null'
                example: null
              last_name:
                type:
                  - string
                  - 'null'
                example: null
              company_name:
                type:
                  - string
                  - 'null'
                example: null
              industry:
                type:
                  - string
                  - 'null'
                example: null
              address:
                type:
                  - string
                  - 'null'
                example: null
              custom1:
                type:
                  - string
                  - 'null'
                example: null
              custom2:
                type:
                  - string
                  - 'null'
                example: null
              custom3:
                type:
                  - string
                  - 'null'
                example: null
              custom4:
                type:
                  - string
                  - 'null'
                example: null
              scheduling_charge:
                type: string
                example: '0.0000'
              calender_id:
                type:
                  - string
                  - 'null'
                example: null
              appointment_booked:
                type: boolean
                example: false
              call_duration:
                type: integer
                example: 0
              status:
                type: string
                example: dial_no_answer
              improvement_tags:
                type: array
                items:
                  type: string
                example: []
              outcome:
                type: string
                example: Unknown
              recording_url:
                type:
                  - string
                  - 'null'
                example: null
              recording_file:
                type:
                  - string
                  - 'null'
                example: null
              transcription:
                type: array
                items:
                  type: string
                example: []
              transcription_text:
                type: string
                example: ''
              notes:
                type: string
                example: ''
              credit_deduction:
                type: string
                example: '0.0000'
              errors:
                type: string
                example: ''
              response_sentiment:
                type: string
                example: NOT_DETECTED
              triggered_by_crm:
                type: string
                example: GHL
              dynamic_variables:
                type:
                  - string
                  - 'null'
                example: null
              extract_dynamic_variables:
                type:
                  - string
                  - 'null'
                example: null
              created_at:
                type: string
                format: date-time
                example: '2025-08-08T20:04:34.718079Z'
              updated_at:
                type: string
                format: date-time
                example: '2025-08-08T20:09:11.544410Z'
              quick_campaign:
                type: string
                example: quickcamp2062236c
    Error:
      required:
        - success
        - message
        - data
      type: object
      properties:
        success:
          type: boolean
        message:
          type: string
        data:
          type: object
  securitySchemes:
    api_key:
      type: apiKey
      in: header
      name: api_key

````