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

# Get Agent Stats

> Retrieve the usage statistics of an agent.



## OpenAPI

````yaml GET /api/v1/agent-stats/{agentId}
openapi: 3.1.0
info:
  title: PlayAI API
  version: 1.0.0
  description: |
    A single, combined OpenAPI specification that merges:
      • PlayAI Agent API
      • PlayAI PlayNote API
      • PlayAI Text-to-Speech (TTS) API
      • PlayAI Dialog Turbo API

    This file contains all endpoints, schemas, and components 
    from the four original specs. See "Merged Issues" below 
    for notes on how certain conflicts were resolved.
servers:
  - url: https://api.play.ai
security:
  - ApiKeyAuth: []
    XUserIdAuth: []
paths:
  /api/v1/agent-stats/{agentId}:
    get:
      description: Returns all available statistics for a specific agent.
      parameters:
        - name: agentId
          in: path
          description: The agent's ID.
          required: true
          schema:
            $ref: '#/components/schemas/AgentId'
        - name: accept
          in: header
          required: false
          schema:
            type: string
            enum:
              - application/json
      responses:
        '200':
          $ref: '#/components/responses/AgentStatsResourceResponse'
      security:
        - ApiKeyAuth: []
          XUserIdAuth: []
components:
  schemas:
    AgentId:
      description: The unique ID for each agent.
      type: string
      example: f0gZrOKBKL7veJ6o1M
    AgentStatsResource:
      type: object
      properties:
        id:
          $ref: '#/components/schemas/AgentId'
        numberOfConversations:
          type: number
          nullable: false
          example: 121
        numberOfPhoneConversations:
          type: number
          nullable: false
          example: 0
        numberOfSecondsTalked:
          type: number
          nullable: true
          example: 2342
      required:
        - id
        - numberOfConversations
        - numberOfPhoneConversations
        - numberOfSecondsTalked
  responses:
    AgentStatsResourceResponse:
      description: Agent statistics response.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/AgentStatsResource'
  securitySchemes:
    ApiKeyAuth:
      type: http
      scheme: bearer
      description: >
        Your secret API key from [PlayAI](https://play.ai/api/keys), formatted
        as `Bearer YOUR_SECRET_API_KEY`.
    XUserIdAuth:
      type: apiKey
      in: header
      name: X-USER-ID
      description: |
        Your unique user ID from [PlayAI](https://play.ai/api/keys).
      x-prompt: What is your PlayAI user ID?

````