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

# Performance

> Returns the total number of agent chats, the number of good and bad ratings they received, and how well they performed in the early stages of a chat. The report also shows the time an agent spent chatting, accepting and not accepting chats, as well as the total time they were logged in.

**Required scopes:** `reports_read`


## OpenAPI

````yaml /api/reports/v3.7/openapi.json post /reports/agents/performance
openapi: 3.0.0
info:
  title: Reports API
  description: Access and extract all the Reports data available in Text.
  version: '3.7'
servers:
  - url: https://api.livechatinc.com/v3.7
    description: Production
security:
  - PersonalAccessToken: []
  - OAuth2BearerToken: []
tags:
  - name: Chats
  - name: Agents
  - name: Customers
  - name: Tags
  - name: Stats
  - name: Sales
    description: Sales performance reports.
paths:
  /reports/agents/performance:
    post:
      tags:
        - Agents
      summary: Performance
      description: >-
        Returns the total number of agent chats, the number of good and bad
        ratings they received, and how well they performed in the early stages
        of a chat. The report also shows the time an agent spent chatting,
        accepting and not accepting chats, as well as the total time they were
        logged in.
      operationId: post-agents-performance
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AgentsReportRequest'
            example:
              filters:
                from: '2026-06-08T00:00:00-00:00'
                to: '2026-06-15T23:59:59-00:00'
        required: true
      responses:
        '200':
          description: OK.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PerformanceResponse'
              example:
                name: performance-report
                records:
                  smith@example.com:
                    accepting_chats_time: 35296
                    chats_count: 4
                    chats_rated_bad: 0
                    chats_rated_good: 2
                    chatting_time: 55
                    first_response_chats_count: 3
                    first_response_time: 9.666666666666666
                    logged_in_time: 45304
                    not_accepting_chats_time: 10008
                  agent@example.com:
                    accepting_chats_time: 24567
                    chats_count: 13
                    chats_rated_bad: 3
                    chats_rated_good: 5
                    chatting_time: 275
                    first_response_chats_count: 8
                    first_response_time: 8.133333
                    logged_in_time: 32110
                    not_accepting_chats_time: 7543
                summary:
                  chats_count: 17
                  chats_rated_bad: 3
                  chats_rated_good: 7
                  first_response_chats_count: 11
                  first_response_time: 8.55151490909091
components:
  schemas:
    AgentsReportRequest:
      type: object
      properties:
        distribution:
          type: string
          enum:
            - hour
            - day
          default: day
          description: The time distribution of results.
        timezone:
          type: string
          description: >-
            The IANA Time Zone identifier (for example, `America/Phoenix`). By
            default, the timezone is taken from the request. If not provided,
            it's taken from the agent's timezone. When the agent's timezone
            cannot be determined, `filters.from` is used to derive it.
        filters:
          $ref: '#/components/schemas/AgentsFilters'
    PerformanceResponse:
      type: object
      properties:
        summary:
          $ref: '#/components/schemas/PerformanceSummary'
        records:
          type: object
          description: Contains agent objects keyed by agent identifier.
          additionalProperties:
            $ref: '#/components/schemas/PerformanceRecord'
    AgentsFilters:
      type: object
      description: >-
        Filters for agents reports. If none provided, the report spans the last
        seven days. If filters are provided, they must contain exactly one
        time-based filter (`from`/`to`).
      properties:
        from:
          type: string
          description: >-
            The start of the time range. Date and time format compatible with
            RFC3339 with optional microsecond resolution:
            `YYYY-MM-DDTHH:MM:SS.ssssss+HH:MM`.
        to:
          type: string
          description: >-
            The end of the time range. Date and time format compatible with
            RFC3339 with optional microsecond resolution:
            `YYYY-MM-DDTHH:MM:SS.ssssss+HH:MM`.
        agents:
          $ref: '#/components/schemas/StringFilterType'
        groups:
          type: object
          description: A group filter.
          properties:
            values:
              type: array
              items:
                type: integer
              description: An array of group IDs.
    PerformanceSummary:
      type: object
      description: A summary for all agents.
      properties:
        chats_count:
          type: integer
          description: The total number of chats the agents had in the specified period.
        chats_rated_good:
          type: integer
          description: The number of chats rated `good`.
        chats_rated_bad:
          type: integer
          description: The number of chats rated `bad`.
        first_response_chats_count:
          type: integer
          description: >-
            The total number of chats in which the agents replied to the first
            message sent by the customers.
        first_response_time:
          type: number
          description: >-
            The average time (in seconds) the agents took to send a first reply
            to the customers' messages.
    PerformanceRecord:
      type: object
      properties:
        chats_count:
          type: integer
          description: The total number of chats the agent had in the specified period.
        chats_rated_good:
          type: integer
          description: The number of the agent's chats rated `good`.
        chats_rated_bad:
          type: integer
          description: The number of the agent's chats rated `bad`.
        first_response_chats_count:
          type: integer
          description: >-
            The number of chats where the agent replied to the first message
            sent by the customer.
        first_response_time:
          type: number
          description: >-
            The average time (in seconds) the agent took to send a first reply
            to the customers' messages.
        accepting_chats_time:
          type: integer
          description: >-
            The time (in seconds) during which the agent had the
            `accepting_chats` status set.
        chatting_time:
          type: integer
          description: The time (in seconds) during which the agent was chatting.
        logged_in_time:
          type: integer
          description: The time (in seconds) during which the agent was logged in.
        not_accepting_chats_time:
          type: integer
          description: >-
            The time (in seconds) during which the agent had the
            `not_accepting_chats` status set.
    StringFilterType:
      type: object
      description: >-
        A filter type for string values. You can pass only one of the following
        at a time: `exists`, `values`, or `exclude_values`.
      properties:
        exists:
          type: boolean
          description: >-
            If `true`: the filter requires the field to exist. Available only
            for Chats parameters.
        values:
          type: array
          items:
            type: string
          description: An array of string values to include.
        exclude_values:
          type: array
          items:
            type: string
          description: An array of string values to exclude.
        require_every_value:
          type: boolean
          description: >-
            If `true`: returns only chats that have all elements passed in
            `values` or `exclude_values`.
  securitySchemes:
    PersonalAccessToken:
      type: http
      scheme: basic
      description: >-
        Use your `account ID` as the username and your personal access token
        (PAT) as the password, or pass a Base64-encoded value directly in the
        Authorization header. For more information, see the <a
        href="/authentication/personal-access-tokens">personal access tokens
        guide</a>.
    OAuth2BearerToken:
      type: http
      scheme: bearer
      description: Authenticate using an OAuth 2.0 Bearer token.
      x-example: us-south1:MQraNrGCsoJvtxD7KNJQB1kM3d5

````