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

# Get scheduler analytics

> Detailed Simple Scheduler analytics. Select which metric blocks to include with the `metrics` parameter: `funnel`, `bookings`, `chart`, `utm`, `google_ads`, `service_areas`, `issue_types`, `customer_events`. Requires the `read:scheduler_analytics` permission.



## OpenAPI

````yaml /api-reference/openapi.json get /api/scheduler-analytics
openapi: 3.1.0
info:
  title: Avoca Enterprise API
  description: >-
    Read-only programmatic access to Avoca data: calls, transcripts, leads,
    coach evaluations, Simple Scheduler sessions and analytics, and outbound
    texting activity.
  version: 1.3.0
servers:
  - url: https://enterprise-api.avoca.ai
security:
  - bearerAuth: []
tags:
  - name: Calls
    description: Call records, transcripts, and pre-call transfers
  - name: Leads
    description: Unified leads (v0) and the canonical leads feed (v1)
  - name: Teams
    description: Teams accessible to the API key
  - name: Coach
    description: Coach (QA) call evaluations and rubrics
  - name: Scheduler Analytics (v0)
    description: Simple Scheduler analytics — legacy flat endpoints
  - name: Sessions & Bookings
    description: v1 scheduling-widget sessions and completed bookings
  - name: Analytics (v1)
    description: v1 funnel, UTM, service-area, and issue-type analytics
  - name: Outbound Texting
    description: Campaign text and subscription-event feeds for BI ingestion
paths:
  /api/scheduler-analytics:
    get:
      tags:
        - Scheduler Analytics (v0)
      summary: Get scheduler analytics
      description: >-
        Detailed Simple Scheduler analytics. Select which metric blocks to
        include with the `metrics` parameter: `funnel`, `bookings`, `chart`,
        `utm`, `google_ads`, `service_areas`, `issue_types`, `customer_events`.
        Requires the `read:scheduler_analytics` permission.
      operationId: getSchedulerAnalytics
      parameters:
        - $ref: '#/components/parameters/xTeamId'
        - $ref: '#/components/parameters/startDate7d'
        - $ref: '#/components/parameters/endDateNow'
        - $ref: '#/components/parameters/timezone'
        - name: scheduler_id
          in: query
          description: Filter to a specific scheduler
          schema:
            type: integer
        - name: metrics
          in: query
          description: 'Comma-separated metric blocks to include (default: all)'
          schema:
            type: string
        - $ref: '#/components/parameters/limit1000'
        - $ref: '#/components/parameters/offset'
      responses:
        '200':
          description: Requested analytics blocks
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/SchedulerAnalytics'
                  pagination:
                    $ref: '#/components/schemas/OffsetPagination'
                  metadata:
                    type: object
                    properties:
                      startDate:
                        type: string
                        format: date-time
                      endDate:
                        type: string
                        format: date-time
                      timezone:
                        type: string
                      schedulerId:
                        type:
                          - integer
                          - 'null'
                      metricsRequested:
                        type: array
                        items:
                          type: string
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
components:
  parameters:
    xTeamId:
      name: x-team-id
      in: header
      description: >-
        Target team ID. Required for multi-team (`enterprise_all_teams` /
        `portfolio_all_teams`) keys on v0 endpoints; single-team keys are locked
        to their team and omit it.
      schema:
        type: integer
    startDate7d:
      name: start_date
      in: query
      description: Start of date range (ISO 8601; default 7 days ago)
      schema:
        type: string
        format: date-time
    endDateNow:
      name: end_date
      in: query
      description: End of date range (ISO 8601; default now)
      schema:
        type: string
        format: date-time
    timezone:
      name: timezone
      in: query
      description: IANA timezone for date calculations (default America/New_York)
      schema:
        type: string
        default: America/New_York
    limit1000:
      name: limit
      in: query
      description: Results per page (default 100, max 1000)
      schema:
        type: integer
        default: 100
        maximum: 1000
    offset:
      name: offset
      in: query
      description: Pagination offset (default 0)
      schema:
        type: integer
        default: 0
  schemas:
    SchedulerAnalytics:
      type: object
      description: >-
        Metric blocks are present only when requested via the `metrics`
        parameter (default: all).
      properties:
        funnel:
          type: object
          properties:
            sessions:
              type: integer
            bookingStarted:
              type: integer
            customerInfoCompleted:
              type: integer
            bookingCompleted:
              type: integer
            conversionRate:
              type: number
        bookings:
          type: object
          properties:
            total:
              type: integer
            avgBookingTimeSeconds:
              type: number
        chartData:
          type: array
          items:
            type: object
            properties:
              date:
                type: string
                format: date
              sessions:
                type: integer
              conversions:
                type: integer
        utmData:
          type: array
          items:
            $ref: '#/components/schemas/UtmRow'
        googleAdsData:
          type: array
          items:
            type: object
            properties:
              gclid:
                type: string
              wbraid:
                type: string
              gbraid:
                type: string
              sessions:
                type: integer
              conversions:
                type: integer
        serviceAreaData:
          type: array
          items:
            type: object
            properties:
              serviceArea:
                type: string
              count:
                type: integer
        issueTypeData:
          type: array
          items:
            type: object
            properties:
              issueType:
                type: string
              count:
                type: integer
        customerEvents:
          type: array
          description: >-
            Individual customer sessions with PII (paginated via
            `limit`/`offset`)
          items:
            type: object
            properties:
              sessionId:
                type: string
              status:
                type: string
              customerInfo:
                type: object
                properties:
                  name:
                    type:
                      - string
                      - 'null'
                  email:
                    type:
                      - string
                      - 'null'
                  phone:
                    type:
                      - string
                      - 'null'
                  address:
                    type:
                      - string
                      - 'null'
              issueType:
                type:
                  - string
                  - 'null'
              jobType:
                type:
                  - string
                  - 'null'
              selectedDate:
                type:
                  - string
                  - 'null'
              selectedTime:
                type:
                  - string
                  - 'null'
              utmSource:
                type:
                  - string
                  - 'null'
              gclid:
                type:
                  - string
                  - 'null'
              conversionValue:
                type:
                  - number
                  - 'null'
              lastActivity:
                type:
                  - string
                  - 'null'
                format: date-time
    OffsetPagination:
      type: object
      properties:
        limit:
          type: integer
        offset:
          type: integer
        has_more:
          type: boolean
    UtmRow:
      type: object
      properties:
        source:
          type: string
          examples:
            - google
        medium:
          type: string
          examples:
            - cpc
        campaign:
          type: string
        term:
          type: string
        content:
          type: string
        sessions:
          type: integer
        conversions:
          type: integer
    Error:
      type: object
      properties:
        error:
          type: string
          description: Error type
        message:
          type: string
          description: Human-readable description (newer endpoints)
      required:
        - error
  responses:
    BadRequest:
      description: Invalid parameters
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Unauthorized:
      description: Missing or invalid API key
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: API key in the format `avoca_<64 hex characters>`

````