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

# Get dashboard analytics

> Tenant-scoped call KPIs and deltas, zero-filled daily activity, breakdowns, assistant ranking, campaign progress, recent calls, and plan-gated module summaries. Date buckets follow the workspace timezone. **Required scope:** `dashboards:read` or `calls:read`.



## OpenAPI

````yaml /api-reference/openapi.json get /dashboards/{id}/analytics
openapi: 3.1.0
info:
  title: OurAiCalling API
  version: 1.0.0
  description: >-
    REST API for OurAiCalling. Authenticate with an API key (`fam_...`, created
    under **Settings → API Keys**) or an OAuth 2.0 access token (`fam_at_...`)
    as a Bearer token.


    Every response uses a consistent envelope: `{ "data": ... , "meta": { ... }
    }` on success and `{ "error": { "code", "message" } }` on failure. List
    endpoints paginate with `?limit=` (default 50, max 200) and `?offset=`;
    `meta.pagination.total` carries the total match count.


    Everything documented here is also exposed as MCP tools at
    `https://app.famulor.io/mcp` (Model Context Protocol, streamable HTTP) using
    the same credentials and permission model.
servers:
  - url: https://app.famulor.io/api/v1
    description: Hosted platform.
  - url: https://{domain}/api/v1
    description: White-label tenant domain — same paths, tenant branding.
    variables:
      domain:
        default: app.famulor.io
        description: Your white-label tenant domain.
security:
  - bearerAuth: []
tags:
  - name: Account
    description: Self-inspection of the calling credential.
  - name: Migrations
    description: Preview and import data from supported legacy platforms.
  - name: Assistants
    description: Create and manage voice assistants.
  - name: Tools
    description: >-
      Reusable tools (HTTP APIs and external MCP servers) assistants can call
      mid-conversation.
  - name: Voices
    description: Browse the text-to-speech voice library.
  - name: Calls
    description: Start outbound calls and read call history, transcripts and recordings.
  - name: History
    description: Unified conversation history across calls, messaging and assistant emails.
  - name: Campaigns
    description: Outbound calling campaigns with a compliant power dialer.
  - name: Leads
    description: Manage Audience contacts across campaigns, channels and Call QA metrics.
  - name: Segments
    description: >-
      Saved, dynamic lead filters — reusable audience definitions used for
      Audience search and campaign lead assignment.
  - name: Suppression
    description: Cross-channel marketing opt-outs and active workspace suppression records.
  - name: Callbacks
    description: >-
      Scheduled callbacks booked by the Schedule callback tool across voice,
      chat, and email.
  - name: Phone Numbers
    description: Marketplace numbers and customer-provided numbers.
  - name: SIP Trunks
    description: Bring your own SIP provider and numbers.
  - name: Carrier Connections
    description: Connect a supported carrier account and import its existing phone numbers.
  - name: Knowledge Bases
    description: RAG knowledge bases and documents for assistants.
  - name: Settings
    description: Workspace-level settings such as caller-memory defaults.
  - name: Billing
    description: Balance and minutes ledger of the key owner.
  - name: Automations
    description: >-
      Native workspace automations — list, create, update, trigger. Plan gate:
      automation_platform.
  - name: Integrations
    description: >-
      Calendar integrations (Cal.com, Calendly, Acuity Scheduling, Google
      Calendar, Outlook, native booking engine). Assign them to assistants to
      provide availability and booking tools, plus provider-supported
      appointment lookup, cancellation, and rescheduling.
  - name: Bookings
    description: >-
      Native booking engine — event types with weekly availability, public
      booking pages at /book/{workspace}/{slug}, and the bookings they produce.
  - name: Dashboards
    description: >-
      Custom analytics dashboards, reusable widgets, and tenant-scoped
      performance analytics. Requires the custom_dashboards plan feature.
  - name: Catalog
    description: >-
      Read-only platform catalogs — available models, supported assistant
      languages, and prompt templates.
  - name: Simulations
    description: Assistant simulation tests (plan-gated).
  - name: Versions
    description: Assistant configuration version history.
  - name: Caller IDs
    description: Outbound caller ID verification.
  - name: Widgets
    description: Web widget connectors.
  - name: Messaging
    description: >-
      Telegram, Slack, and Messenger text bots linked to assistants (Chat SDK).
      Includes conversation delay, inactivity end, and conversation-ended
      webhooks.
  - name: QA
    description: Cohort AI Quality Assurance runs over call transcripts.
  - name: White Label
    description: >-
      Manage the customers of your white-label workspace on their behalf — list,
      register, mint access tokens, log in, log out, and transfer credits.
      Available to reseller workspaces with white-label access, and to platform
      admins (scoped to direct platform customers). Requires `platform:read` /
      `platform:write`.
  - name: API Keys
    description: >-
      Self-service API keys for the calling workspace. A key can only mint
      further keys with a scope subset of its own.
  - name: SMS
    description: Outbound SMS from workspace phone numbers.
paths:
  /dashboards/{id}/analytics:
    parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
          format: uuid
        description: Dashboard ID.
    get:
      tags:
        - Dashboards
      summary: Get dashboard analytics
      description: >-
        Tenant-scoped call KPIs and deltas, zero-filled daily activity,
        breakdowns, assistant ranking, campaign progress, recent calls, and
        plan-gated module summaries. Date buckets follow the workspace timezone.
        **Required scope:** `dashboards:read` or `calls:read`.
      operationId: getDashboardAnalytics
      parameters:
        - name: range
          in: query
          schema:
            type: string
            enum:
              - 7d
              - 14d
              - 30d
              - 90d
            default: 30d
        - name: from
          in: query
          schema:
            type: string
          description: Inclusive ISO date or timestamp.
        - name: to
          in: query
          schema:
            type: string
          description: A date is inclusive; a timestamp is an exclusive boundary.
        - name: assistant_ids
          in: query
          schema:
            type: string
          description: Comma-separated assistant IDs (max 50).
        - name: campaign_ids
          in: query
          schema:
            type: string
          description: Comma-separated campaign IDs (max 50).
        - name: directions
          in: query
          schema:
            type: string
          description: Comma-separated call directions.
        - name: statuses
          in: query
          schema:
            type: string
          description: Comma-separated call statuses.
        - name: sentiments
          in: query
          schema:
            type: string
          description: Comma-separated post-call sentiments.
        - name: success
          in: query
          schema:
            type: boolean
        - name: compare
          in: query
          schema:
            type: boolean
            default: true
          description: Compare with the immediately preceding equal-length period.
      responses:
        '200':
          description: Dashboard analytics.
          content:
            application/json:
              schema:
                type: object
                required:
                  - data
                properties:
                  data:
                    $ref: '#/components/schemas/DashboardAnalytics'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
components:
  schemas:
    DashboardAnalytics:
      type: object
      additionalProperties: false
      required:
        - filters
        - context
        - overview
        - time_series
        - breakdowns
        - top_assistants
        - campaign_progress
        - recent_calls
        - optional
        - quality
        - generated_at
      properties:
        filters:
          type: object
          additionalProperties: false
          required:
            - range
            - current
            - previous
            - assistant_ids
            - campaign_ids
            - directions
            - statuses
            - sentiments
            - success
            - compare
          properties:
            range:
              type: string
              enum:
                - 7d
                - 14d
                - 30d
                - 90d
            current:
              $ref: '#/components/schemas/DashboardAnalyticsPeriod'
            previous:
              $ref: '#/components/schemas/DashboardAnalyticsPeriod'
            assistant_ids:
              type: array
              items:
                type: string
            campaign_ids:
              type: array
              items:
                type: string
            directions:
              type: array
              items:
                type: string
            statuses:
              type: array
              items:
                type: string
            sentiments:
              type: array
              items:
                type: string
            success:
              type:
                - boolean
                - 'null'
            compare:
              type: boolean
        context:
          type: object
          additionalProperties: false
          required:
            - features
            - assistants
            - campaigns
          properties:
            features:
              type: object
              additionalProperties: false
              required:
                - custom_dashboards
                - assistants
                - campaigns
                - bookings
                - knowledge
                - simulations
                - live_monitoring
                - tools
                - phone_numbers
              properties:
                custom_dashboards:
                  type: boolean
                assistants:
                  type: boolean
                campaigns:
                  type: boolean
                bookings:
                  type: boolean
                knowledge:
                  type: boolean
                simulations:
                  type: boolean
                live_monitoring:
                  type: boolean
                tools:
                  type: boolean
                phone_numbers:
                  type: boolean
            assistants:
              type: array
              items:
                type: object
                required:
                  - id
                  - name
                  - is_active
                properties:
                  id:
                    type: string
                  name:
                    type: string
                  is_active:
                    type: boolean
            campaigns:
              type: array
              items:
                type: object
                required:
                  - id
                  - name
                  - status
                  - assistant_id
                properties:
                  id:
                    type: string
                  name:
                    type: string
                  status:
                    type: string
                  assistant_id:
                    type:
                      - string
                      - 'null'
        overview:
          type: object
          additionalProperties: false
          required:
            - total_calls
            - completed_calls
            - analyzed_calls
            - total_duration_sec
            - avg_duration_sec
            - completion_rate
            - success_rate
          properties:
            total_calls:
              $ref: '#/components/schemas/DashboardAnalyticsKpi'
            completed_calls:
              $ref: '#/components/schemas/DashboardAnalyticsKpi'
            analyzed_calls:
              $ref: '#/components/schemas/DashboardAnalyticsKpi'
            total_duration_sec:
              $ref: '#/components/schemas/DashboardAnalyticsKpi'
            avg_duration_sec:
              $ref: '#/components/schemas/DashboardAnalyticsKpi'
            completion_rate:
              $ref: '#/components/schemas/DashboardAnalyticsKpi'
            success_rate:
              $ref: '#/components/schemas/DashboardAnalyticsKpi'
        time_series:
          type: object
          required:
            - current
            - previous
          properties:
            current:
              type: array
              items:
                $ref: '#/components/schemas/DashboardAnalyticsTimePoint'
            previous:
              oneOf:
                - type: array
                  items:
                    $ref: '#/components/schemas/DashboardAnalyticsTimePoint'
                - type: 'null'
        breakdowns:
          type: object
          additionalProperties: false
          required:
            - status
            - direction
            - sentiment
            - success
            - outcome
          properties:
            status:
              type: array
              items:
                $ref: '#/components/schemas/DashboardAnalyticsBreakdownItem'
            direction:
              type: array
              items:
                $ref: '#/components/schemas/DashboardAnalyticsBreakdownItem'
            sentiment:
              type: array
              items:
                $ref: '#/components/schemas/DashboardAnalyticsBreakdownItem'
            success:
              type: array
              items:
                $ref: '#/components/schemas/DashboardAnalyticsBreakdownItem'
            outcome:
              type: array
              items:
                $ref: '#/components/schemas/DashboardAnalyticsBreakdownItem'
        top_assistants:
          type: array
          items:
            type: object
            required:
              - assistant_id
              - assistant_name
              - total_calls
              - completed_calls
              - total_duration_sec
              - success_rate
            properties:
              assistant_id:
                type:
                  - string
                  - 'null'
              assistant_name:
                type: string
              total_calls:
                type: integer
              completed_calls:
                type: integer
              total_duration_sec:
                type: number
              success_rate:
                type: number
        campaign_progress:
          type: array
          items:
            type: object
            required:
              - campaign_id
              - campaign_name
              - status
              - total_leads
              - completed_leads
              - remaining_leads
              - calls_made
              - progress_percent
              - total_duration_sec
              - period_calls
              - period_success_rate
            properties:
              campaign_id:
                type: string
              campaign_name:
                type: string
              status:
                type: string
              total_leads:
                type: integer
              completed_leads:
                type: integer
              remaining_leads:
                type: integer
              calls_made:
                type: integer
              progress_percent:
                type: number
              total_duration_sec:
                type: number
              period_calls:
                type: integer
              period_success_rate:
                type: number
        recent_calls:
          type: array
          maxItems: 20
          items:
            $ref: '#/components/schemas/DashboardRecentCall'
        optional:
          $ref: '#/components/schemas/DashboardOptionalAnalytics'
        quality:
          type: object
          additionalProperties: false
          required:
            - calls_truncated
            - context_truncated
            - warnings
          properties:
            calls_truncated:
              type: boolean
            context_truncated:
              type: boolean
            warnings:
              type: array
              items:
                type: string
        generated_at:
          type: string
          format: date-time
    DashboardAnalyticsPeriod:
      type: object
      additionalProperties: false
      required:
        - from
        - to
        - days
      properties:
        from:
          type: string
          format: date-time
          description: Inclusive.
        to:
          type: string
          format: date-time
          description: Exclusive.
        days:
          type: integer
          minimum: 1
    DashboardAnalyticsKpi:
      type: object
      additionalProperties: false
      required:
        - value
        - previous_value
        - delta
        - delta_percent
      properties:
        value:
          type: number
        previous_value:
          type:
            - number
            - 'null'
        delta:
          type:
            - number
            - 'null'
        delta_percent:
          type:
            - number
            - 'null'
          description: Null when comparison is off or the previous value is zero.
    DashboardAnalyticsTimePoint:
      type: object
      additionalProperties: false
      required:
        - bucket
        - date
        - total_calls
        - completed_calls
        - successful_calls
        - duration_sec
      properties:
        bucket:
          type: integer
          minimum: 0
        date:
          type: string
          format: date
        total_calls:
          type: integer
        completed_calls:
          type: integer
        successful_calls:
          type: integer
        duration_sec:
          type: number
    DashboardAnalyticsBreakdownItem:
      type: object
      additionalProperties: false
      required:
        - key
        - label
        - count
        - percentage
      properties:
        key:
          type: string
        label:
          type: string
        count:
          type: integer
        percentage:
          type: number
          minimum: 0
          maximum: 100
    DashboardRecentCall:
      type: object
      additionalProperties: false
      required:
        - id
        - assistant_id
        - assistant_name
        - campaign_id
        - campaign_name
        - direction
        - from_number
        - to_number
        - status
        - duration_sec
        - sentiment
        - success
        - outcome
        - created_at
      properties:
        id:
          type: string
          format: uuid
        assistant_id:
          type:
            - string
            - 'null'
        assistant_name:
          type: string
        campaign_id:
          type:
            - string
            - 'null'
        campaign_name:
          type:
            - string
            - 'null'
        direction:
          type: string
        from_number:
          type:
            - string
            - 'null'
        to_number:
          type:
            - string
            - 'null'
        status:
          type: string
        duration_sec:
          type: number
        sentiment:
          type:
            - string
            - 'null'
        success:
          type:
            - boolean
            - 'null'
        outcome:
          type:
            - string
            - 'null'
        created_at:
          type: string
          format: date-time
    DashboardOptionalAnalytics:
      type: object
      additionalProperties: false
      required:
        - bookings
        - knowledge
        - simulations
        - live_monitoring
      properties:
        bookings:
          oneOf:
            - type: 'null'
            - type: object
              required:
                - total
                - by_status
                - by_source
              properties:
                total:
                  type: integer
                by_status:
                  type: array
                  items:
                    $ref: '#/components/schemas/DashboardAnalyticsBreakdownItem'
                by_source:
                  type: array
                  items:
                    $ref: '#/components/schemas/DashboardAnalyticsBreakdownItem'
        knowledge:
          oneOf:
            - type: 'null'
            - type: object
              required:
                - knowledge_bases
                - documents
                - ready_documents
                - processing_documents
                - error_documents
                - total_chunks
              properties:
                knowledge_bases:
                  type: integer
                documents:
                  type: integer
                ready_documents:
                  type: integer
                processing_documents:
                  type: integer
                error_documents:
                  type: integer
                total_chunks:
                  type: integer
        simulations:
          oneOf:
            - type: 'null'
            - type: object
              required:
                - total_runs
                - running
                - passed
                - failed
                - error
                - average_score
              properties:
                total_runs:
                  type: integer
                running:
                  type: integer
                passed:
                  type: integer
                failed:
                  type: integer
                error:
                  type: integer
                average_score:
                  type:
                    - number
                    - 'null'
        live_monitoring:
          oneOf:
            - type: 'null'
            - type: object
              required:
                - active_calls
                - latency
              properties:
                active_calls:
                  type: integer
                latency:
                  type: object
                  required:
                    - e2e_latency_ms
                    - llm_ttft_ms
                    - tts_ttfb_ms
                    - stt_ms
                  properties:
                    e2e_latency_ms:
                      $ref: '#/components/schemas/DashboardLatencyMetric'
                    llm_ttft_ms:
                      $ref: '#/components/schemas/DashboardLatencyMetric'
                    tts_ttfb_ms:
                      $ref: '#/components/schemas/DashboardLatencyMetric'
                    stt_ms:
                      $ref: '#/components/schemas/DashboardLatencyMetric'
    ErrorEnvelope:
      type: object
      description: Error envelope returned by every /api/v1 endpoint on failure.
      required:
        - error
      properties:
        error:
          type: object
          required:
            - code
            - message
          properties:
            code:
              type: string
              enum:
                - unauthorized
                - forbidden
                - not_found
                - invalid_request
                - rate_limited
                - conflict
                - telephony_configuration_error
                - telephony_unavailable
                - internal_error
              description: Stable, machine-readable error code.
            message:
              type: string
              description: Human-readable description of the error.
    DashboardLatencyMetric:
      type: object
      additionalProperties: false
      required:
        - p50
        - p95
        - sample_count
      properties:
        p50:
          type:
            - number
            - 'null'
        p95:
          type:
            - number
            - 'null'
        sample_count:
          type: integer
  responses:
    BadRequest:
      description: Invalid request body or parameters.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorEnvelope'
          example:
            error:
              code: invalid_request
              message: '"to_number" is required (E.164 format, e.g. +4930123456).'
    Unauthorized:
      description: Missing, invalid, expired or revoked API key / access token.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorEnvelope'
          example:
            error:
              code: unauthorized
              message: Invalid API key.
    Forbidden:
      description: >-
        The API key lacks the required scope, or the plan does not allow this
        action.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorEnvelope'
          example:
            error:
              code: forbidden
              message: This API key is missing the required scope "assistants:write".
    NotFound:
      description: Resource not found (or it belongs to another workspace).
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorEnvelope'
          example:
            error:
              code: not_found
              message: Assistant not found
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API key
      description: >-
        API key (`fam_...`, created under **Settings → API Keys**) or an OAuth
        2.0 access token (`fam_at_...`). Keys can be restricted to scopes such
        as `assistants:read`, `calls:write`, `campaigns:write`,
        `automations:read`, `dashboards:read`, `dashboards:write`,
        `leads:write`, `segments:write`, `phone_numbers:write`,
        `sip_trunks:write`, `knowledge:write`, `voices:read`, `billing:read`,
        `settings:write`, `platform:read`, `platform:write`; a `*:write` scope
        implies the matching `*:read`. Automation and dashboard endpoints also
        accept the legacy `calls:*` scope. Keys without scope restrictions have
        full access.

````