> ## 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.

# Availability

> Returns for how long an agent, group, or the whole account was available for chatting during a specified period of time. Depending on the `distribution` parameter, the response contains a different time resolution.

**Required scopes:** `reports_read`


## OpenAPI

````yaml /api/reports/v3.6/openapi.json post /reports/agents/availability
openapi: 3.0.0
info:
  title: Reports API
  description: Access and extract all the Reports data available in Text.
  version: '3.6'
servers:
  - url: https://api.livechatinc.com/v3.6
    description: Production
security:
  - PersonalAccessToken: []
  - OAuth2BearerToken: []
tags:
  - name: Chats
  - name: Agents
  - name: Customers
  - name: Tags
paths:
  /reports/agents/availability:
    post:
      tags:
        - Agents
      summary: Availability
      description: >-
        Returns for how long an agent, group, or the whole account was available
        for chatting during a specified period of time. Depending on the
        `distribution` parameter, the response contains a different time
        resolution.
      operationId: post-agents-availability
      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/AvailabilityResponse'
              example:
                name: availability-report
                total: 19.59
                records:
                  '2021-04-08':
                    hours: 0
                  '2021-04-09':
                    hours: 0
                  '2021-04-10':
                    hours: 0.15
                  '2021-04-11':
                    hours: 7.85
                  '2021-04-12':
                    hours: 7.99
                  '2021-04-13':
                    hours: 2.28
                  '2021-04-14':
                    hours: 1.32
                  '2021-04-15':
                    hours: 0
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'
    AvailabilityResponse:
      type: object
      properties:
        total:
          type: integer
          description: The total time the chat was available in the specified date range.
        records:
          type: object
          description: Contains distribution objects, for example, `day`.
          additionalProperties:
            type: object
            properties:
              hours:
                type: number
                description: >-
                  The total number of hours the chat was available. Only for the
                  `day` distribution.
              minutes:
                type: number
                description: >-
                  The total number of minutes the chat was available. Only for
                  the `hour` distribution.
    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.
    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

````