> ## 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.

# Number pool call metrics

> Compare caller numbers used by sequence number pools, with answer rates, voicemail, retries, and durations. Filter by date, pool, agent, or sequence.

Requires `sequences:read`. This is a read-only report of **sequence calls that used a number pool at call time**. Ordinary single-number or trunk calls and one-time calls are excluded, even if the same number or agent is used. No matching pool attempts returns zero totals and an empty `rows` array.

Supply `start_date` and `end_date` as ISO timestamps with timezones. The start is inclusive, the end is exclusive, and the range can be at most 31 days. Calls are selected by their start time. Optional `pool_id`, `sequence_id`, and `agent_id` filters apply together.

Use `group_by=caller_number` for per-number results, `day` for UTC daily trends, or `attempt` for the first, second, and third positions within a sequence phone step. `totals` always covers the whole filtered range. Up to 500 groups are returned; when `truncated` is true, narrow the filters rather than presenting the rows as a complete breakdown.

### How metrics are counted

* **Attempts:** each recorded call counts once. Retries count separately. A setup attempt that never created a call record does not count.
* **Unique contacts:** each contact linked to an owned call session counts once within the total or group. Do not sum unique contacts across numbers, days, or attempt positions.
* **Answered:** the sequence classified the attempt as human answered. Detected voicemail is separate. Answer rate is answered attempts divided by all attempts, including pending calls, multiplied by 100. It is `null` when there are no attempts.
* **Busy:** includes declined calls, matching the sequence outcome. **Failed** includes calls the sequence settled as failed, canceled, or missed.
* **Pending:** calls still initiating, ringing, or in progress without a settled outcome. **Unknown:** terminal calls whose pool outcome has not been recorded or recognized. Unknown does not mean no answer.
* **Connected duration:** time from answer to end for ended calls with valid timestamps, including voicemail. It excludes ringing and still-active calls. Averages are `null` when no eligible samples exist.

The caller-number grouping uses the caller number saved on the pool attempt, not today's agent settings or pool membership. A missing caller ID is grouped under a `null` key. Historical attempts remain available after number replacement, pool reassignment, pool deletion, or removing a person from the sequence while their sequence and call records are retained. These totals describe past calls; they do not put removed people back into the sending audience.

### Companion apps

Ask Companion to build a number-pool performance app using `get_sequence_number_pool_call_metrics`. Mini apps call the same operation as `getSequenceNumberPoolCallMetrics`. The report supplies live data; building an app does not change calling behavior or enable pools.

Spam reputation, carrier billing, and negotiated audio encryption are not part of this report.


## OpenAPI

````yaml get /sequences/number-pool-call-metrics
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:
  /sequences/number-pool-call-metrics:
    get:
      summary: Read per-number metrics for sequence calls made through number pools
      description: >-
        Read-only, workspace-scoped metrics from persisted pool attempts and
        call records. Excludes ordinary single-number/trunk calls and one-time
        calls. Returns zero totals and no rows when no pool calls match.
        Historical callers remain included after number replacement or pool
        reassignment. Filter by call start time (maximum 31 days), pool, agent,
        or sequence; group by caller number, UTC day, or retry position. No
        calls or settings are changed. Requires sequences:read.
      operationId: getSequenceNumberPoolCallMetrics
      parameters:
        - schema:
            type: string
            format: date-time
            pattern: >-
              ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$
          in: query
          name: start_date
          required: true
          description: Inclusive call start time, with timezone.
        - schema:
            type: string
            format: date-time
            pattern: >-
              ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$
          in: query
          name: end_date
          required: true
          description: 'Exclusive call start time, with timezone. Maximum window: 31 days.'
        - schema:
            default: caller_number
            type: string
            enum:
              - caller_number
              - day
              - attempt
          in: query
          name: group_by
          required: false
          description: >-
            Group by recorded pool caller number, UTC day, or 1-based attempt
            position within a sequence step.
        - 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: pool_id
          required: false
          description: >-
            Pool used at call time, including a pool that has since been
            deleted.
        - 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: sequence_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: agent_id
          required: false
      responses:
        '200':
          description: Default Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NumberPoolCallMetricsResponse'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDto'
components:
  schemas:
    NumberPoolCallMetricsResponse:
      $schema: https://json-schema.org/draft/2020-12/schema
      $id: '#/components/schemas/NumberPoolCallMetricsResponse'
      type: object
      properties:
        scope:
          type: string
          const: sequence_number_pool_calls
        start_date:
          type: string
        end_date:
          type: string
        group_by:
          default: caller_number
          description: >-
            Group by recorded pool caller number, UTC day, or 1-based attempt
            position within a sequence step.
          type: string
          enum:
            - caller_number
            - day
            - attempt
        totals:
          type: object
          properties:
            attempts:
              type: integer
              minimum: 0
              maximum: 9007199254740991
              description: Distinct persisted call attempts; retries count separately.
            unique_contacts:
              type: integer
              minimum: 0
              maximum: 9007199254740991
              description: >-
                Distinct contacts linked to owned call sessions; never sum this
                across groups.
            answered:
              type: integer
              minimum: 0
              maximum: 9007199254740991
              description: Attempts settled as human answered by the sequence.
            voicemail:
              type: integer
              minimum: 0
              maximum: 9007199254740991
            no_answer:
              type: integer
              minimum: 0
              maximum: 9007199254740991
            busy:
              type: integer
              minimum: 0
              maximum: 9007199254740991
              description: Busy or declined attempts, matching the sequence outcome.
            failed:
              type: integer
              minimum: 0
              maximum: 9007199254740991
              description: >-
                Attempts settled as failed, including canceled or missed
                attempts.
            pending:
              type: integer
              minimum: 0
              maximum: 9007199254740991
              description: Unsettled attempts still initiating, ringing or in progress.
            unknown:
              type: integer
              minimum: 0
              maximum: 9007199254740991
              description: Terminal attempts without a recognized pool outcome yet.
            answer_rate:
              anyOf:
                - type: number
                - type: 'null'
              description: >-
                Human-answered attempts / all attempts × 100; null when no
                attempts.
            connected_seconds:
              type: number
              minimum: 0
              description: >-
                Sum of answered_at to ended_at for ended connected calls,
                including voicemail.
            average_connected_seconds:
              anyOf:
                - type: number
                - type: 'null'
              description: >-
                Average over ended calls with valid answer/end timestamps; null
                when none.
            average_ring_seconds:
              anyOf:
                - type: number
                - type: 'null'
              description: >-
                Average over calls with a recorded ring duration; null when
                none.
          required:
            - attempts
            - unique_contacts
            - answered
            - voicemail
            - no_answer
            - busy
            - failed
            - pending
            - unknown
            - answer_rate
            - connected_seconds
            - average_connected_seconds
            - average_ring_seconds
          additionalProperties: false
        rows:
          type: array
          items:
            type: object
            properties:
              attempts:
                type: integer
                minimum: 0
                maximum: 9007199254740991
                description: Distinct persisted call attempts; retries count separately.
              unique_contacts:
                type: integer
                minimum: 0
                maximum: 9007199254740991
                description: >-
                  Distinct contacts linked to owned call sessions; never sum
                  this across groups.
              answered:
                type: integer
                minimum: 0
                maximum: 9007199254740991
                description: Attempts settled as human answered by the sequence.
              voicemail:
                type: integer
                minimum: 0
                maximum: 9007199254740991
              no_answer:
                type: integer
                minimum: 0
                maximum: 9007199254740991
              busy:
                type: integer
                minimum: 0
                maximum: 9007199254740991
                description: Busy or declined attempts, matching the sequence outcome.
              failed:
                type: integer
                minimum: 0
                maximum: 9007199254740991
                description: >-
                  Attempts settled as failed, including canceled or missed
                  attempts.
              pending:
                type: integer
                minimum: 0
                maximum: 9007199254740991
                description: Unsettled attempts still initiating, ringing or in progress.
              unknown:
                type: integer
                minimum: 0
                maximum: 9007199254740991
                description: Terminal attempts without a recognized pool outcome yet.
              answer_rate:
                anyOf:
                  - type: number
                  - type: 'null'
                description: >-
                  Human-answered attempts / all attempts × 100; null when no
                  attempts.
              connected_seconds:
                type: number
                minimum: 0
                description: >-
                  Sum of answered_at to ended_at for ended connected calls,
                  including voicemail.
              average_connected_seconds:
                anyOf:
                  - type: number
                  - type: 'null'
                description: >-
                  Average over ended calls with valid answer/end timestamps;
                  null when none.
              average_ring_seconds:
                anyOf:
                  - type: number
                  - type: 'null'
                description: >-
                  Average over calls with a recorded ring duration; null when
                  none.
              key:
                anyOf:
                  - type: string
                  - type: 'null'
                description: >-
                  Caller number, UTC date, or attempt position. Null means
                  caller ID was not recorded.
            required:
              - attempts
              - unique_contacts
              - answered
              - voicemail
              - no_answer
              - busy
              - failed
              - pending
              - unknown
              - answer_rate
              - connected_seconds
              - average_connected_seconds
              - average_ring_seconds
              - key
            additionalProperties: false
        truncated:
          type: boolean
          description: >-
            At most 500 groups are returned. Totals cover the full filtered
            window; narrow filters if true.
      required:
        - scope
        - start_date
        - end_date
        - group_by
        - totals
        - rows
        - truncated
      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.