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

# Phone agents

> Get each agent's phone rings — offered, answered, declined, missed, canceled, answer rate, and seconds from ring to accept — for a date range.

Agents are judged only on their own rings. `answer_rate` is `answered / (answered + declined + missed)`; `canceled` rings, ended because another agent answered or the caller left, are reported but not held against the agent. `avg_seconds_to_answer` runs from the agent's ring to their accept and never includes queue time before the ring. `answered_within_target` counts answers given within the wait's target, timed the same way, so an agent who picks up quickly after a long queue is credited even though the wait missed the team's SLA.


## OpenAPI

````yaml get /sla/analytics/phone/agents
openapi: 3.1.0
info:
  title: OpenCX API
  description: >

    OpenCX is an AI-powered, all-in-one platform for customer support and
    outbound communications.


    Use this API to manage your OpenCX organization's AI agents, actions,
    conversations, contacts, and more.


    To get started, generate a new API key from the dashboard.


    ## Authentication

    All API endpoints require authentication using a Bearer token. You can
    generate an API key from your OpenCX dashboard.


    ## Rate Limiting

    API requests are rate limited to ensure fair usage. The current limits are:

    - 100 requests per minute for standard endpoints

    - 1000 requests per minute for streaming endpoints


    ## Error Handling

    The API uses standard HTTP status codes and returns detailed error messages
    in the response body.
  version: 1.0-beta
  license:
    name: MIT
    url: https://opensource.org/licenses/MIT
servers:
  - url: http://localhost:8080
    description: Development
  - url: https://api.open.cx
    description: Production
security:
  - bearerAuth: []
paths:
  /sla/analytics/phone/agents:
    get:
      summary: Get phone answer analytics per agent
      description: >-
        Get each agent's rings: how many they were offered, answered, declined
        and missed, their answer rate and how quickly they answered once rung.
      operationId: getPhoneAnswerAnalyticsAgents
      parameters:
        - schema: {}
          in: query
          name: from
          required: true
          description: Start of the range, on when callers started waiting.
        - schema: {}
          in: query
          name: to
          required: true
          description: End of the range, on when callers started waiting.
        - schema:
            default: UTC
            type: string
          in: query
          name: timezone
          required: false
          description: IANA timezone for day and hour buckets.
        - schema:
            type: string
            maxLength: 36
          in: query
          name: team_id
          required: false
        - schema:
            type: string
            format: uuid
            pattern: >-
              ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
          in: query
          name: policy_id
          required: false
      responses:
        '200':
          description: Default Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PhoneAnswerAgentsResponseDto'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDto'
components:
  schemas:
    PhoneAnswerAgentsResponseDto:
      $schema: https://json-schema.org/draft/2020-12/schema
      $id: '#/components/schemas/PhoneAnswerAgentsResponseDto'
      type: array
      items:
        type: object
        properties:
          user_id:
            type: integer
            minimum: -9007199254740991
            maximum: 9007199254740991
          name:
            type: string
          offered:
            type: integer
            minimum: -9007199254740991
            maximum: 9007199254740991
            description: Rings this agent received.
          answered:
            type: integer
            minimum: -9007199254740991
            maximum: 9007199254740991
          declined:
            type: integer
            minimum: -9007199254740991
            maximum: 9007199254740991
          missed:
            type: integer
            minimum: -9007199254740991
            maximum: 9007199254740991
            description: Rings that ran out on this agent.
          canceled:
            type: integer
            minimum: -9007199254740991
            maximum: 9007199254740991
            description: Rings ended by someone else answering or the caller leaving.
          answer_rate:
            type: number
            description: answered / (answered + declined + missed), 0–1.
          avg_seconds_to_answer:
            anyOf:
              - type: number
              - type: 'null'
            description: From this agent’s ring to their accept.
          answered_within_target:
            type: integer
            minimum: -9007199254740991
            maximum: 9007199254740991
            description: Answers given within the target, timed from this agent’s own ring.
        required:
          - user_id
          - name
          - offered
          - answered
          - declined
          - missed
          - canceled
          - answer_rate
          - avg_seconds_to_answer
          - answered_within_target
        additionalProperties: false
    ErrorDto:
      type: object
      properties:
        statusCode:
          type: integer
        message:
          type: string
        error:
          type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````

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