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

# Get Call Metrics

> Retrieves call metrics and analytics data after a call has completed.



## OpenAPI

````yaml get /api/v1/call/get-metric
openapi: 3.0.3
info:
  title: Dialgen API
  description: >-
    Dialgen API allows you to programmatically initiate and monitor AI-powered
    voice calls, either one at a time or in high-volume batches.
  version: 1.0.0
  contact:
    name: Dialgen Support
    url: https://sa.dialgen.ai
servers:
  - url: https://sa.dialgen.ai
    description: Production server
security:
  - bearerAuth: []
tags:
  - name: Agents
    description: Operations related to AI agents
  - name: Calls
    description: Operations related to individual calls
  - name: Batches
    description: Operations related to batch campaigns
paths:
  /api/v1/call/get-metric:
    get:
      tags:
        - Calls
      summary: Get Call Metrics
      description: Retrieves call metrics and analytics data after a call has completed.
      operationId: getCallMetrics
      parameters:
        - name: callId
          in: query
          description: The call identifier
          required: true
          schema:
            type: string
            example: call_123
        - name: userId
          in: query
          description: The user identifier
          required: true
          schema:
            type: string
            example: user_456
        - name: agentId
          in: query
          description: The agent identifier
          required: true
          schema:
            type: string
            example: agent_789
        - name: contactId
          in: query
          description: The contact identifier
          required: true
          schema:
            type: string
            example: contact_123
      responses:
        '200':
          description: Call metrics retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CallMetricsResponse'
              example:
                success: true
                callData:
                  id: call_123
                  contactId: contact_123
                  agentId: agent_456
                  status: COMPLETED
                  startTime: '2024-01-15T10:00:00.000Z'
                  endTime: '2024-01-15T10:03:00.000Z'
                  duration: 180
                  phoneNumber: '+1234567890'
                  contactName: John Doe
                  transcription: {}
                  summary: Demo call completed successfully...
                  metricJson:
                    intent: SALES_INQUIRY
                    sentiment: positive
                    confidence: 0.95
                    keyPoints:
                      - Interested in pricing
                      - Wants demo
                    customerSatisfaction: 5
                metricSchema: {}
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/InternalServerError'
components:
  schemas:
    CallMetricsResponse:
      type: object
      properties:
        success:
          type: boolean
        callData:
          type: object
          properties:
            id:
              type: string
            contactId:
              type: string
            agentId:
              type: string
            status:
              type: string
            startTime:
              type: string
              format: date-time
            endTime:
              type: string
              format: date-time
            duration:
              type: number
            phoneNumber:
              type: string
            contactName:
              type: string
            transcription:
              type: object
            summary:
              type: string
            metricJson:
              type: object
              additionalProperties: true
        metricSchema:
          type: object
    Error:
      type: object
      properties:
        error:
          type: string
        code:
          type: string
        message:
          type: string
        details:
          type: object
  responses:
    BadRequest:
      description: Missing or invalid fields/parameters
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: Bad Request
            message: Missing required parameter
    Unauthorized:
      description: Missing or invalid API key
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: Unauthorized
            message: Invalid or missing API key
    NotFound:
      description: The requested resource was not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: Not Found
            message: Resource not found
    InternalServerError:
      description: An unexpected server error occurred
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: Internal Server Error
            message: An unexpected error occurred
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        Bearer token authentication. Obtain your API key from the Dialgen API
        Keys dashboard at https://sa.dialgen.ai/api-keys

````