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

# Analytics overview

> Volume, connect rate, duration, cost and latency across the workspace for a date range, with deltas against the preceding range of equal length. Scope `analytics:read`.



## OpenAPI

````yaml /api-reference/openapi.json get /analytics/overview
openapi: 3.1.0
info:
  title: Lehar API
  version: v0
  description: >-
    Customer-facing REST API for the Lehar voice-AI platform. Platform-admin
    endpoints are intentionally excluded from this reference. Regenerate with
    `npm run sync:openapi`.
servers:
  - url: https://api.lehar.ai/ca/api/v0
security:
  - ApiKeyAuth: []
  - BearerAuth: []
paths:
  /analytics/overview:
    get:
      tags:
        - Analytics
      summary: Analytics overview
      description: >-
        Volume, connect rate, duration, cost and latency across the workspace
        for a date range, with deltas against the preceding range of equal
        length. Scope `analytics:read`.
      operationId: get_overview_ca_api_v0_analytics_overview_get
      parameters:
        - name: from
          in: query
          required: false
          schema:
            type: string
            format: date
          description: Inclusive UTC day. Defaults to 7 days before `to`.
        - name: to
          in: query
          required: false
          schema:
            type: string
            format: date
          description: Inclusive UTC day. Defaults to today. Max span 400 days.
        - name: agent_id
          in: query
          required: false
          schema:
            type: string
        - name: campaign_id
          in: query
          required: false
          schema:
            type: string
      responses:
        '200':
          description: Overview tiles, outcome counts and latency percentiles
          content:
            application/json:
              example:
                data:
                  range:
                    from: '2026-08-01'
                    to: '2026-08-11'
                  tiles:
                    attempts:
                      value: 1284
                      delta_pct: 12.4
                    connect_rate:
                      value: 0.6231
                      delta_pct: -3.1
                    avg_duration_s:
                      value: 96.4
                      delta_pct: 1.8
                    cost_credits:
                      value: 812.55
                      delta_pct: 9.7
                  outcomes:
                    completed: 742
                    no_media: 38
                    no_answer: 301
                    busy: 44
                    declined: 61
                    failed: 52
                    user_disconnected: 40
                    expired: 6
                  latency:
                    p50_ms: 940
                    p95_ms: 2180
                    sessions: 742
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-KEY
    BearerAuth:
      type: http
      scheme: bearer

````