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

# Get routing availability for all users

> Returns the routing availability for all users. Used by a dispatcher to check which agents are currently available to pick up a ticket.



## OpenAPI

````yaml https://dev.enneo.dev/api/mind/docs/open-api get /telephony/routingAvailability
openapi: 3.0.0
info:
  version: '1'
  title: enneo.MIND API
  description: This describes the API of enneo Mind, the main ticketing backend
  contact:
    name: enneo GmbH
    email: richard@enneo.ai
  license:
    name: Proprietary software
    url: https://enneo.ai
servers:
  - url: https://demo.enneo.ai/api/mind
    description: Production server, demo client
  - url: https://main.enneo.dev/api/mind
    description: Development main branch
  - url: http://localhost:8005/api/mind
    description: Local development server
security:
  - bearerAuth:
      - api
  - cookieAuth:
      - api
paths:
  /telephony/routingAvailability:
    get:
      tags:
        - Telephony
      summary: Get routing availability for all users
      description: >-
        Returns the routing availability for all users. Used by a dispatcher to
        check which agents are currently available to pick up a ticket.
      operationId: routingAvailability
      parameters:
        - name: userId
          in: query
          required: false
          description: Optional filter to return only a specific user
          schema:
            type: integer
          example: 4
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: true
                  users:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                          description: The user ID
                          example: 42
                        status:
                          type: string
                          description: The user's current status
                          nullable: true
                        chatRoutingStatus:
                          $ref: '#/components/schemas/RoutingStatus'
                        callRoutingStatus:
                          $ref: '#/components/schemas/RoutingStatus'
                        skills:
                          type: object
                          properties:
                            tagIds:
                              type: array
                              items:
                                type: integer
                              description: IDs of tags representing user skills
                              example:
                                - 1
                                - 2
                                - 3
                            channels:
                              type: array
                              items:
                                type: string
                              description: Communication channels the user is skilled in
                              example:
                                - email
                                - phone
                                - chat
                        currentTickets:
                          type: array
                          items:
                            type: integer
                          description: >-
                            IDs of tickets currently being worked on by the user
                            (opened in UI)
                          example:
                            - 123
                            - 456
                        queueTickets:
                          type: array
                          items:
                            type: integer
                          description: >-
                            IDs of tickets assigned to the user in the routing
                            queue
                          example:
                            - 789
                        lastActivity:
                          type: string
                          format: date-time
                          description: Timestamp of the user's last activity
                          example: '2024-03-20 14:30:00'
        '403':
          description: Unauthorized - user does not have permission to read user status
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Internal error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    RoutingStatus:
      type: string
      description: The routing status for queues (calls, chats, etc)
      enum:
        - idle
        - interacting
        - beingConnected
        - notResponding
        - unavailable
        - offline
        - acw
    Error:
      type: object
      description: Data format of Enneo error messages
      properties:
        error:
          type: string
          example: Contract 121 could not be processed
          description: Readable error message that should be shown to the user
        details:
          type: string
          example: >-
            Uncatched null point exception in testFunction() in
            /app/src/file:212
          description: Not easily readable error message that is for the developer
        txId:
          type: string
          example: c916167c94
          description: >-
            Internal transaction id. Useful for debugging. Corresponds to the
            OpenTelemetry trace ID.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: JWT-based authentication
      x-scopes:
        api: Full access to the API
    cookieAuth:
      type: apiKey
      in: cookie
      name: connect.sid
      description: Cookie-based authentication
      x-scopes:
        api: Full access to the API

````