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

# List call metrics

> Fetch all call-level metrics for a specific call, including both system-generated and custom metrics. Only returns rows from the **latest** metric-collection job per metric — if the same metric has been recomputed, prior runs are excluded and remain in the metric history. By default returns only successfully computed metrics; pass `?status=all` to also include rows that resolved as NOT_APPLICABLE / DATA_MISSING / ERROR (the `value` field is omitted on those entries — check `captureStatus`).



## OpenAPI

````yaml /api-reference/openapi.documented.json get /v1/call/{callId}/metrics
openapi: 3.1.0
info:
  title: Roark Analytics API
  description: >-
    The Roark Analytics API gives you access to the same API that powers the
    award winning Roark Analytics platform.
  version: 1.0.0
servers:
  - description: Production
    url: https://api.roark.ai
security:
  - Bearer: []
tags:
  - name: Agent
  - name: Agent Endpoint
  - name: Call
  - name: Chat
  - name: Metric
  - name: Metric Policy
  - name: Metric Collection Job
  - name: Customer Flow
  - name: Customer Flow Edge Case
  - name: Simulation
  - name: Simulation Persona
  - name: Simulation Environment
  - name: Simulation Scenario
  - name: Simulation Run Plan
  - name: Simulation Template
  - name: Simulation Run Plan Job
  - name: Simulation Job
  - name: HTTP Request Definition
  - name: Webhook
  - name: Issue
  - name: Knowledge Base
  - name: Config
  - name: CLI Auth
  - name: Call Analysis
  - name: Health
paths:
  /v1/call/{callId}/metrics:
    get:
      tags:
        - Call
      summary: List call metrics
      description: >-
        Fetch all call-level metrics for a specific call, including both
        system-generated and custom metrics. Only returns rows from the
        **latest** metric-collection job per metric — if the same metric has
        been recomputed, prior runs are excluded and remain in the metric
        history. By default returns only successfully computed metrics; pass
        `?status=all` to also include rows that resolved as NOT_APPLICABLE /
        DATA_MISSING / ERROR (the `value` field is omitted on those entries —
        check `captureStatus`).
      operationId: getV1CallByCallIdMetrics
      parameters:
        - in: query
          name: flatten
          schema:
            type: string
            description: >-
              Whether to return a flat list instead of grouped by metric
              definition (default: false)
        - in: query
          name: status
          schema:
            type: string
            enum:
              - success
              - all
            default: success
            description: >-
              Filter metrics by capture status. `success` (default) returns only
              successfully computed metrics — backwards-compatible with the
              historical behavior. `all` also returns NOT_APPLICABLE /
              DATA_MISSING / ERROR rows (with `value` omitted), so clients can
              distinguish "still computing" from "computed but no value" and
              exit retry loops correctly.
        - schema:
            type: string
          in: path
          name: callId
          required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        metricDefinitionId:
                          type: string
                          format: uuid
                          description: Unique identifier for the metric definition
                        slug:
                          type: string
                          description: Stable metric slug
                        metricId:
                          type: string
                          description: >-
                            Alias of `slug` retained for backwards
                            compatibility. Same value as `slug`.
                        name:
                          type: string
                          description: Name of the metric
                        description:
                          type: string
                          description: Description of what the metric measures
                        type:
                          type: string
                          enum:
                            - COUNT
                            - NUMERIC
                            - BOOLEAN
                            - SCALE
                            - TEXT
                            - CLASSIFICATION
                            - OFFSET
                          description: Type of value this metric produces
                        scope:
                          type: string
                          enum:
                            - GLOBAL
                            - PER_PARTICIPANT
                          description: Whether metric is global or per-participant
                        unit:
                          type: object
                          properties:
                            name:
                              type: string
                              description: Name of the unit
                            symbol:
                              type:
                                - string
                                - 'null'
                              description: Symbol for the unit
                          required:
                            - name
                            - symbol
                          description: Unit information if applicable
                        values:
                          type: array
                          items:
                            anyOf:
                              - type: object
                                properties:
                                  value:
                                    anyOf:
                                      - type: number
                                      - type: boolean
                                      - type: string
                                    description: >-
                                      The metric value (type depends on
                                      outputType). Present only on SUCCESS rows;
                                      omitted for NOT_APPLICABLE / DATA_MISSING
                                      / ERROR.
                                  callId:
                                    type: string
                                    format: uuid
                                    description: >-
                                      ID of the call this value was computed on.
                                      Only set when the response spans multiple
                                      conversations (e.g. job-scoped metric
                                      values).
                                  chatId:
                                    type: string
                                    format: uuid
                                    description: >-
                                      ID of the chat this value was computed on.
                                      Only set when the response spans multiple
                                      conversations (e.g. job-scoped metric
                                      values).
                                  captureStatus:
                                    type: string
                                    enum:
                                      - SUCCESS
                                      - NOT_APPLICABLE
                                      - DATA_MISSING
                                      - ERROR
                                    description: >-
                                      Result state of this metric computation.
                                      SUCCESS carries a real `value`;
                                      NOT_APPLICABLE / DATA_MISSING / ERROR do
                                      not (the `value` field is omitted).
                                      Non-SUCCESS rows only appear when the
                                      request includes ?status=all.
                                  errorMessage:
                                    type: string
                                    description: >-
                                      Error detail when captureStatus is ERROR —
                                      e.g. provider down, LLM timeout. Undefined
                                      for other statuses.
                                  context:
                                    type: string
                                    enum:
                                      - CALL
                                      - SEGMENT
                                      - SEGMENT_RANGE
                                    description: >-
                                      Context level: CALL (entire conversation),
                                      SEGMENT (single segment), SEGMENT_RANGE
                                      (between/across segments)
                                  participantRole:
                                    type: string
                                    enum:
                                      - agent
                                      - customer
                                    description: >-
                                      Role of participant (only for
                                      PER_PARTICIPANT metrics)
                                  valueReasoning:
                                    type: string
                                    description: >-
                                      Explanation for the metric value
                                      (especially useful for AI-computed
                                      metrics)
                                  confidence:
                                    type: number
                                    minimum: 0
                                    maximum: 1
                                    description: >-
                                      Confidence score (0-1) for the computed
                                      value. Defaults to 1.0 for deterministic
                                      metrics. Omitted on non-SUCCESS rows.
                                  computedAt:
                                    type: string
                                    format: date-time
                                    description: >-
                                      ISO 8601 timestamp when the metric was
                                      computed
                                  policyIds:
                                    type: array
                                    items:
                                      type: string
                                      format: uuid
                                    description: >-
                                      IDs of metric policies that triggered this
                                      metric computation
                                  segment:
                                    type: object
                                    properties:
                                      id:
                                        type: string
                                        format: uuid
                                        description: Segment ID
                                      text:
                                        type: string
                                        description: Segment text content
                                      startOffsetMs:
                                        type: number
                                        description: Start time offset in milliseconds
                                      endOffsetMs:
                                        type: number
                                        description: End time offset in milliseconds
                                    required:
                                      - id
                                      - text
                                      - startOffsetMs
                                      - endOffsetMs
                                    description: >-
                                      Segment information (for SEGMENT context
                                      metrics)
                                  fromSegment:
                                    type: object
                                    properties:
                                      id:
                                        type: string
                                        format: uuid
                                        description: Segment ID
                                      text:
                                        type: string
                                        description: Segment text content
                                      startOffsetMs:
                                        type: number
                                        description: Start time offset in milliseconds
                                      endOffsetMs:
                                        type: number
                                        description: End time offset in milliseconds
                                    required:
                                      - id
                                      - text
                                      - startOffsetMs
                                      - endOffsetMs
                                    description: >-
                                      Starting segment information (for
                                      SEGMENT_RANGE context metrics)
                                  toSegment:
                                    type: object
                                    properties:
                                      id:
                                        type: string
                                        format: uuid
                                        description: Segment ID
                                      text:
                                        type: string
                                        description: Segment text content
                                      startOffsetMs:
                                        type: number
                                        description: Start time offset in milliseconds
                                      endOffsetMs:
                                        type: number
                                        description: End time offset in milliseconds
                                    required:
                                      - id
                                      - text
                                      - startOffsetMs
                                      - endOffsetMs
                                    description: >-
                                      Ending segment information (for
                                      SEGMENT_RANGE context metrics)
                                required:
                                  - captureStatus
                                  - context
                                  - computedAt
                                title: Standard metric value
                                description: A metric value entry. Applies to every metric.
                              - type: object
                                properties:
                                  value:
                                    anyOf:
                                      - type: number
                                      - type: boolean
                                      - type: string
                                    description: >-
                                      The metric value (type depends on
                                      outputType). Present only on SUCCESS rows;
                                      omitted for NOT_APPLICABLE / DATA_MISSING
                                      / ERROR.
                                  callId:
                                    type: string
                                    format: uuid
                                    description: >-
                                      ID of the call this value was computed on.
                                      Only set when the response spans multiple
                                      conversations (e.g. job-scoped metric
                                      values).
                                  chatId:
                                    type: string
                                    format: uuid
                                    description: >-
                                      ID of the chat this value was computed on.
                                      Only set when the response spans multiple
                                      conversations (e.g. job-scoped metric
                                      values).
                                  captureStatus:
                                    type: string
                                    enum:
                                      - SUCCESS
                                      - NOT_APPLICABLE
                                      - DATA_MISSING
                                      - ERROR
                                    description: >-
                                      Result state of this metric computation.
                                      SUCCESS carries a real `value`;
                                      NOT_APPLICABLE / DATA_MISSING / ERROR do
                                      not (the `value` field is omitted).
                                      Non-SUCCESS rows only appear when the
                                      request includes ?status=all.
                                  errorMessage:
                                    type: string
                                    description: >-
                                      Error detail when captureStatus is ERROR —
                                      e.g. provider down, LLM timeout. Undefined
                                      for other statuses.
                                  context:
                                    type: string
                                    enum:
                                      - CALL
                                      - SEGMENT
                                      - SEGMENT_RANGE
                                    description: >-
                                      Context level: CALL (entire conversation),
                                      SEGMENT (single segment), SEGMENT_RANGE
                                      (between/across segments)
                                  participantRole:
                                    type: string
                                    enum:
                                      - agent
                                      - customer
                                    description: >-
                                      Role of participant (only for
                                      PER_PARTICIPANT metrics)
                                  valueReasoning:
                                    type: string
                                    description: >-
                                      Explanation for the metric value
                                      (especially useful for AI-computed
                                      metrics)
                                  confidence:
                                    type: number
                                    minimum: 0
                                    maximum: 1
                                    description: >-
                                      Confidence score (0-1) for the computed
                                      value. Defaults to 1.0 for deterministic
                                      metrics. Omitted on non-SUCCESS rows.
                                  computedAt:
                                    type: string
                                    format: date-time
                                    description: >-
                                      ISO 8601 timestamp when the metric was
                                      computed
                                  policyIds:
                                    type: array
                                    items:
                                      type: string
                                      format: uuid
                                    description: >-
                                      IDs of metric policies that triggered this
                                      metric computation
                                  segment:
                                    type: object
                                    properties:
                                      id:
                                        type: string
                                        format: uuid
                                        description: Segment ID
                                      text:
                                        type: string
                                        description: Segment text content
                                      startOffsetMs:
                                        type: number
                                        description: Start time offset in milliseconds
                                      endOffsetMs:
                                        type: number
                                        description: End time offset in milliseconds
                                    required:
                                      - id
                                      - text
                                      - startOffsetMs
                                      - endOffsetMs
                                    description: >-
                                      Segment information (for SEGMENT context
                                      metrics)
                                  fromSegment:
                                    type: object
                                    properties:
                                      id:
                                        type: string
                                        format: uuid
                                        description: Segment ID
                                      text:
                                        type: string
                                        description: Segment text content
                                      startOffsetMs:
                                        type: number
                                        description: Start time offset in milliseconds
                                      endOffsetMs:
                                        type: number
                                        description: End time offset in milliseconds
                                    required:
                                      - id
                                      - text
                                      - startOffsetMs
                                      - endOffsetMs
                                    description: >-
                                      Starting segment information (for
                                      SEGMENT_RANGE context metrics)
                                  toSegment:
                                    type: object
                                    properties:
                                      id:
                                        type: string
                                        format: uuid
                                        description: Segment ID
                                      text:
                                        type: string
                                        description: Segment text content
                                      startOffsetMs:
                                        type: number
                                        description: Start time offset in milliseconds
                                      endOffsetMs:
                                        type: number
                                        description: End time offset in milliseconds
                                    required:
                                      - id
                                      - text
                                      - startOffsetMs
                                      - endOffsetMs
                                    description: >-
                                      Ending segment information (for
                                      SEGMENT_RANGE context metrics)
                                  propertyVerdicts:
                                    type: array
                                    items:
                                      type: object
                                      properties:
                                        propertyName:
                                          type: string
                                          description: >-
                                            The call property checked, as sent at
                                            ingest
                                        expectedValue:
                                          type: string
                                          description: >-
                                            The value supplied at ingest, frozen at
                                            scoring time
                                        observedValue:
                                          type: string
                                          description: >-
                                            What the transcript said instead. Only
                                            present when verdict is MISMATCH.
                                        verdict:
                                          type: string
                                          enum:
                                            - MATCH
                                            - MISMATCH
                                            - TRANSCRIPTION_ERROR
                                            - NOT_MENTIONED
                                          description: >-
                                            How this property resolved against the
                                            transcript. NOT_MENTIONED means the
                                            subject never came up and is not a
                                            mismatch.
                                        reasoning:
                                          type: string
                                          description: Judge reasoning for this verdict
                                        segment:
                                          type: object
                                          properties:
                                            id:
                                              type: string
                                              format: uuid
                                              description: Segment ID
                                            text:
                                              type: string
                                              description: Segment text content
                                            startOffsetMs:
                                              type: number
                                              description: Start time offset in milliseconds
                                            endOffsetMs:
                                              type: number
                                              description: End time offset in milliseconds
                                          required:
                                            - id
                                            - text
                                            - startOffsetMs
                                            - endOffsetMs
                                          description: >-
                                            The transcript segment this property was
                                            referred to in: the conflicting value
                                            for MISMATCH, the confirming reference
                                            for MATCH. Omitted for NOT_MENTIONED and
                                            when the verdict could not be anchored.
                                      required:
                                        - propertyName
                                        - expectedValue
                                        - verdict
                                    description: >-
                                      Per-property verdicts for the Property
                                      Mismatch metric, in the order the
                                      properties were checked. Omitted for every
                                      other metric.
                                required:
                                  - captureStatus
                                  - context
                                  - computedAt
                                title: Property verification metric value
                                description: >-
                                  Returned for the Property Mismatch metric
                                  (`property_transcript_mismatch`): the standard
                                  entry plus the per-property verdict breakdown.
                          description: >-
                            Array of metric values (multiple for PER_PARTICIPANT
                            metrics, or multiple segments/turns)
                      required:
                        - metricDefinitionId
                        - slug
                        - metricId
                        - name
                        - description
                        - type
                        - scope
                        - values
                      description: Metric data grouped by metric definition
                    description: >-
                      Conversation metrics response payload grouped by metric
                      definition
                required:
                  - data
          description: Call-level metrics for a specific call
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
                description: Authentication error
              example:
                type: authentication
                code: unauthorized
                message: Authentication required
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
                description: Permission error
              example:
                type: forbidden
                code: permission_denied
                message: You do not have permission to access this resource
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
                description: Not found error
              example:
                type: not_found
                code: resource_not_found
                message: The requested resource could not be found
          description: Not Found
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
                description: Rate limit error
              example:
                type: rate_limit
                code: too_many_requests
                message: Rate limit exceeded
          description: Too Many Requests
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
                description: Server error
              example:
                type: internal
                code: internal_error
                message: Internal server error
          description: Internal Server Error
      x-codeSamples:
        - lang: JavaScript
          source: |-
            import Roark from '@roarkanalytics/sdk';

            const client = new Roark({
              bearerToken: process.env['ROARK_API_BEARER_TOKEN'], // This is the default and can be omitted
            });

            const response = await client.call.listMetrics('callId');

            console.log(response.data);
        - lang: Python
          source: |-
            import os
            from roark_analytics import Roark

            client = Roark(
                bearer_token=os.environ.get("ROARK_API_BEARER_TOKEN"),  # This is the default and can be omitted
            )
            response = client.call.list_metrics(
                call_id="callId",
            )
            print(response.data)
components:
  schemas:
    ErrorResponse:
      type: object
      properties:
        type:
          type: string
          enum:
            - validation
            - authentication
            - forbidden
            - not_found
            - conflict
            - payment_required
            - rate_limit
            - internal
          description: The error type category
          examples:
            - validation
            - authentication
        code:
          type: string
          description: Machine-readable error code identifier
          examples:
            - invalid_parameter
            - missing_required_field
            - unauthorized
        message:
          type: string
          description: Human-readable error message
          examples:
            - The request was invalid
            - Authentication required
        param:
          type: string
          description: The parameter that caused the error (if applicable)
          examples:
            - email
            - user_id
        details:
          description: Additional error context information
      required:
        - type
        - code
        - message
  securitySchemes:
    Bearer:
      type: http
      scheme: bearer
      bearerFormat: JWT

````