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

# Get Conversation Statistics

> Retrieve detailed statistics and analytics for a specific conversation

## Overview

Get comprehensive performance statistics and analytics for a specific conversation, including call duration, disposition, per-utterance analytics, and agent response latency. Use this endpoint to investigate individual conversations for quality assurance, coaching, or debugging.

## Required Permission

`conversations`

## Path Parameters

| Name             | Type   | Required | Description                            |
| ---------------- | ------ | -------- | -------------------------------------- |
| `conversationId` | string | Yes      | Unique identifier of the conversation. |

## Example cURL

```bash theme={null}
curl "https://api.inya.ai/platform/v1/conversations/conv_abc123/stats" \
  -H "x-api-key: <your_api_key>"
```

## Response

### Success (200)

```json theme={null}
{
  "status": "success",
  "requestId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "message": "Conversation details fetched successfully",
  "response": [
    {
      "conversationId": "conv_abc123",
      "botId": "58f010d9e797494aae193fdc537a7c33",
      "botName": "Support Agent",
      "callDuration": 600,
      "startTime": 1752918000,
      "endTime": 1752918600,
      "callStatus": "completed",
      "callSummary": {
        "disposition": "resolved"
      },
      "utteranceAnalytics": [],
      "overallCallDisposition": "resolved",
      "averageAgentLatency": 1.5,
      "callProcessed": true,
      "lastProcessedOn": "2026-07-21T10:30:00Z"
    }
  ]
}
```

## Response Fields

| Field                     | Type    | Description                                                               |
| ------------------------- | ------- | ------------------------------------------------------------------------- |
| `conversationId`          | string  | Unique conversation identifier.                                           |
| `botId`                   | string  | Agent that handled this conversation.                                     |
| `botName`                 | string  | Display name of the agent.                                                |
| `callDuration`            | integer | Call duration in seconds.                                                 |
| `startTime`               | integer | Unix timestamp (seconds) of call start.                                   |
| `endTime`                 | integer | Unix timestamp (seconds) of call end.                                     |
| `callStatus`              | string  | Final call status (e.g. `completed`, `failed`).                           |
| `callSummary.disposition` | string  | Call outcome determined by the LLM.                                       |
| `utteranceAnalytics`      | array   | Per-utterance analytics data.                                             |
| `overallCallDisposition`  | string  | Aggregated call disposition.                                              |
| `averageAgentLatency`     | number  | Average agent response time in seconds. Lower is better.                  |
| `callProcessed`           | boolean | Whether the analytics pipeline has finished processing this conversation. |
| `lastProcessedOn`         | string  | ISO 8601 timestamp of the last analytics processing run.                  |

### Error Responses

**403 Forbidden** - Insufficient permissions

```json theme={null}
{
  "status": "failure",
  "requestId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "message": "User does not have access to this conversation"
}
```

**404 Not Found** - Conversation does not exist

```json theme={null}
{
  "status": "failure",
  "requestId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "message": "Conversation not found"
}
```

## Use Cases

* Analyzing individual call performance and disposition
* Reviewing agent response latency for optimization
* Identifying conversations with unexpected outcomes for coaching
* Compliance and audit review of recorded conversations

<Info>
  The `averageAgentLatency` metric is key to understanding agent responsiveness. A value above `2.0` seconds typically indicates LLM or TTS configuration that may benefit from optimization.
</Info>

<Tip>
  Check `call_processed: true` before relying on `utterance_analytics`. Processing happens asynchronously and may not be complete immediately after a call ends.
</Tip>

<Note>
  Save the `requestId` from every response. You will need it if you contact Inya support to trace a specific request.
</Note>


## OpenAPI

````yaml GET /v1/conversations/{conversationId}/stats
openapi: 3.0.3
info:
  title: Platform Agents API
  description: API endpoints for creating, managing, and interacting with voice agents
  version: 2.1.0
servers:
  - url: https://api.inya.ai/platform
    description: Production server
security:
  - ApiKeyAuth: []
tags:
  - name: Agents
    description: Agent management operations
  - name: AgentFAQ
    description: Agent FAQ management
  - name: AgentCallTriggers
    description: Outbound call triggers
  - name: ChatSDK
    description: Chat Widget configuration
  - name: Conversations
    description: Conversation logs, statistics, and audio
paths:
  /v1/conversations/{conversationId}/stats:
    get:
      tags:
        - Conversations
      summary: Get Conversation Statistics
      description: >-
        Retrieve detailed performance statistics and analytics for a specific
        conversation.
      operationId: getConversationStats
      parameters:
        - name: conversationId
          in: path
          required: true
          schema:
            type: string
          description: Unique identifier of the conversation.
      responses:
        '200':
          description: Conversation statistics retrieved successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    example: success
                  requestId:
                    type: string
                  message:
                    type: string
                    example: Conversation details fetched successfully
                  response:
                    type: array
                    items:
                      type: object
                      properties:
                        conversationId:
                          type: string
                        botId:
                          type: string
                          example: fb79920229d144608ebf665a10e50275
                        botName:
                          type: string
                          example: Support Agent
                        callDuration:
                          type: integer
                        startTime:
                          type: integer
                        endTime:
                          type: integer
                        callStatus:
                          type: string
                          example: completed
                        callSummary:
                          type: object
                          properties:
                            disposition:
                              type: string
                        utteranceAnalytics:
                          type: array
                          items: {}
                        overallCallDisposition:
                          type: string
                        averageAgentLatency:
                          type: number
                        callProcessed:
                          type: boolean
                        lastProcessedOn:
                          type: string
                          format: date-time
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/ServerError'
      security:
        - ConversationsApiKeyAuth: []
components:
  responses:
    Forbidden:
      description: Permission denied
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    NotFound:
      description: Resource not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    ServerError:
      description: Internal server error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
  schemas:
    ErrorResponse:
      type: object
      properties:
        status:
          type: string
          example: error
        requestId:
          type: string
          example: a1b2c3d4-e5f6-7890-abcd-ef1234567890
        message:
          type: string
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: API key with 'agents' permission
    ConversationsApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: API key with 'conversations' permission

````