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

# Get analytics

> Read workspace overview numbers, a comparison of campaigns, one campaign in detail, or with `view` one of the other reports (funnel, A/B email results, calls, agents, deliverability and more).



## OpenAPI

````yaml /openapi.json get /api/v1/public/analytics
openapi: 3.1.0
info:
  description: >-
    Customer-facing API for managing outreach, leads, conversations, voice
    agents, knowledge bases, analytics, and webhooks.
  title: Sendora Public API
  version: 1.0.0
servers:
  - description: Production
    url: https://api.sendora.ai
security: []
tags:
  - description: Leads, lead lists, importing, enriching and finding new prospects.
    name: Leads
  - description: Build, run and measure outreach, and enroll leads.
    name: Campaigns
  - description: Read and send messages, and manage who must not be contacted.
    name: Conversations
  - description: >-
      Voice and chat agents, their tools, knowledge bases, voices and website
      widgets.
    name: Agents
  - description: >-
      Start calls, and manage phone numbers, SMS registration, sending accounts
      and email domains.
    name: Calls and numbers
  - description: Webhooks, jobs, analytics and the Copilot assistant.
    name: Platform
  - description: Manage client workspaces, plans and branding.
    name: Agency
paths:
  /api/v1/public/analytics:
    get:
      tags:
        - Platform
      summary: Get analytics
      description: >-
        Read workspace overview numbers, a comparison of campaigns, one campaign
        in detail, or with `view` one of the other reports (funnel, A/B email
        results, calls, agents, deliverability and more).
      operationId: get_analytics_api_v1_public_analytics_get
      parameters:
        - description: >-
            workspace is the overview, campaigns compares campaigns, campaign is
            one campaign in detail.
          in: query
          name: scope
          required: false
          schema:
            default: workspace
            description: >-
              workspace is the overview, campaigns compares campaigns, campaign
              is one campaign in detail.
            enum:
              - workspace
              - campaigns
              - campaign
            title: Scope
            type: string
        - description: >-
            The campaign's id: the `id` from List or get campaigns. It is also
            the last part of that page's address in the app.
          in: query
          name: campaign_id
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: With scope campaign, or the campaign for a view that needs one.
            title: Campaign Id
        - in: query
          name: days
          required: false
          schema:
            default: 30
            maximum: 365
            minimum: 1
            title: Days
            type: integer
        - description: >-
            A single report instead of scope. funnel, outcomes and
            email_variants (the A/B result of each email step) need campaign_id.
            top_campaigns, calls, agents, meetings, geo, deliverability,
            mailboxes, accounts_health, send_cap, ai_spend, ai_decisions,
            activity_feed, action_queue.
          in: query
          name: view
          required: false
          schema:
            anyOf:
              - enum:
                  - funnel
                  - outcomes
                  - email_variants
                  - top_campaigns
                  - calls
                  - agents
                  - meetings
                  - geo
                  - deliverability
                  - mailboxes
                  - accounts_health
                  - send_cap
                  - ai_spend
                  - ai_decisions
                  - activity_feed
                  - action_queue
                type: string
              - type: 'null'
            description: >-
              A single report instead of scope. funnel, outcomes and
              email_variants (the A/B result of each email step) need
              campaign_id. top_campaigns, calls, agents, meetings, geo,
              deliverability, mailboxes, accounts_health, send_cap, ai_spend,
              ai_decisions, activity_feed, action_queue.
            title: View
        - description: >-
            The voice agent's id: the `id` from List or get agents. It is also
            the last part of that page's address in the app.
          in: query
          name: agent_id
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: 'view calls: only this voice agent.'
            title: Agent Id
        - description: 'With view: inclusive date YYYY-MM-DD, replaces days.'
          in: query
          name: start_date
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: 'With view: inclusive date YYYY-MM-DD, replaces days.'
            title: Start Date
        - description: 'With view: inclusive date YYYY-MM-DD.'
          in: query
          name: end_date
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: 'With view: inclusive date YYYY-MM-DD.'
            title: End Date
        - description: >-
            view top_campaigns: meetings, sends, replies or connect_rate. view
            geo: leads, sends, replies or meetings.
          in: query
          name: metric
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: >-
              view top_campaigns: meetings, sends, replies or connect_rate. view
              geo: leads, sends, replies or meetings.
            title: Metric
        - description: >-
            view top_campaigns, ai_spend, ai_decisions: 24h, 7d, 30d or 90d.
            view deliverability: 24h, 7d or 30d.
          in: query
          name: window
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: >-
              view top_campaigns, ai_spend, ai_decisions: 24h, 7d, 30d or 90d.
              view deliverability: 24h, 7d or 30d.
            title: Window
        - description: 'view ai_spend: model or feature.'
          in: query
          name: dimension
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: 'view ai_spend: model or feature.'
            title: Dimension
        - description: 'view outcomes: call (default) or reply.'
          in: query
          name: outcome_type
          required: false
          schema:
            anyOf:
              - enum:
                  - call
                  - reply
                type: string
              - type: 'null'
            description: 'view outcomes: call (default) or reply.'
            title: Outcome Type
        - description: 'With view: rows to return.'
          in: query
          name: limit
          required: false
          schema:
            default: 50
            description: 'With view: rows to return.'
            maximum: 200
            minimum: 1
            title: Limit
            type: integer
        - description: 'With view calls: rows to skip.'
          in: query
          name: offset
          required: false
          schema:
            default: 0
            description: 'With view calls: rows to skip.'
            minimum: 0
            title: Offset
            type: integer
        - in: header
          name: X-API-Key
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: X-Api-Key
        - in: header
          name: Authorization
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Authorization
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AnalyticsOut'
          description: Successful Response
        '401':
          description: The X-API-Key header is missing, invalid, expired, or revoked.
        '402':
          description: >-
            The workspace is suspended for billing, or the request would exceed
            a plan or usage limit.
        '403':
          description: >-
            The key is valid but lacks the required scope, or the workspace has
            no active plan, lacks the entitlement, or has this feature turned
            off or view-only.
        '410':
          description: The workspace behind this key has been deleted.
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
        '500':
          description: >-
            An unexpected Sendora error occurred. Retry only if the operation is
            safe to repeat.
        '503':
          description: >-
            An entitlement or billing check is temporarily unavailable. Retry
            after the Retry-After interval.
      security:
        - ApiKeyAuth: []
      x-codeSamples:
        - label: cURL
          lang: bash
          source: >-
            curl -X GET 'https://api.sendora.ai/api/v1/public/analytics' -H
            "X-API-Key: $SENDORA_API_KEY"
        - label: Python
          lang: python
          source: |-
            import requests

            url = 'https://api.sendora.ai/api/v1/public/analytics'
            headers = {'X-API-Key': '$SENDORA_API_KEY'}
            response = requests.get(url, headers=headers)
            response.raise_for_status()
            print(response.json())
        - label: JavaScript
          lang: javascript
          source: >-
            const response = await
            fetch("https://api.sendora.ai/api/v1/public/analytics", {
              method: "GET",
              headers: { 'X-API-Key': process.env.SENDORA_API_KEY },
            });

            if (!response.ok) throw new Error(await response.text());

            console.log(await response.json());
        - label: Go
          lang: go
          source: >-
            req, err := http.NewRequest("GET",
            "https://api.sendora.ai/api/v1/public/analytics", nil)

            if err != nil { log.Fatal(err) }

            req.Header.Set("X-API-Key", os.Getenv("SENDORA_API_KEY"))

            resp, err := http.DefaultClient.Do(req)

            if err != nil { log.Fatal(err) }

            defer resp.Body.Close()
components:
  schemas:
    AnalyticsOut:
      additionalProperties: true
      properties:
        kpis:
          anyOf:
            - type: object
            - type: 'null'
          description: Headline numbers (scope workspace).
          title: Kpis
      required: []
      title: AnalyticsOut
      type: object
    HTTPValidationError:
      properties:
        detail:
          description: Detail returned by the Sendora API.
          items:
            $ref: '#/components/schemas/ValidationError'
          title: Detail
          type: array
      required: []
      title: HTTPValidationError
      type: object
    ValidationError:
      properties:
        loc:
          description: Loc returned by the Sendora API.
          items:
            anyOf:
              - type: string
              - type: integer
          title: Location
          type: array
        msg:
          description: Msg returned by the Sendora API.
          title: Message
          type: string
        type:
          description: Type returned by the Sendora API.
          title: Error Type
          type: string
      required:
        - loc
        - msg
        - type
      title: ValidationError
      type: object
  securitySchemes:
    ApiKeyAuth:
      description: Customer API key created in the Sendora dashboard.
      in: header
      name: X-API-Key
      type: apiKey

````

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