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

# Dashboard: a queue in Monitoring

> The queue's numbers right now, its users and the protocols open in it. `none` returns the protocols still without a queue.



## OpenAPI

````yaml /api-reference/openapi.en.yaml get /reports/dashboard/monitoring/queues/{queueId}
openapi: 3.0.3
info:
  title: Connecta DESK Public API
  version: 1.0.0
  description: >-
    Public API of Connecta DESK, available at `/api/v1`. Access uses a token
    generated in the tokens module. Each token has permissions per **module ×
    method**, and every list read is paginated.


    ## Authentication


    ```

    Authorization: Bearer sk_live_a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6

    ```


    The token belongs to a **company**, not to a user. The company used is
    always the token's company, so sending `companyId` in the body has no
    effect. A missing, invalid, revoked or expired token gets the same `401`
    response.


    ## Order of checks


    1. **token** → `401`

    2. **active company** → `403`

    3. **API enabled on the plan** → `403 ERR_API_NOT_ENABLED` (does not apply
    to on-premise)

    4. **company rate limit** → `429`

    5. **token permission** → `403 ERR_API_FORBIDDEN_SCOPE`


    ## User ids


    Every user id in the API is the user's id **in this company**, the same one
    `GET /users` returns. This applies to what the API returns (`user.id`,
    `assignedTo.id`, `userCreated.id`) and to what it accepts (`userId`,
    `userIds`, `assignedToUserId` and the `{id}` in user routes).


    The same person can work in several companies, with a different name and
    profile in each one, and has a different id in each company.


    An id that does not belong to this company returns `404`, with the same
    message as an id that does not exist.


    ## Pagination


    Every list `GET` is paginated. The `meta` contains only `page`, `perPage`
    and `hasMore`, without the total number of records. To go through
    everything, keep advancing `page` while `hasMore` is `true`.


    ## Idempotency


    Optional on `POST`/`PUT`, through the `Idempotency-Key` header. If you
    repeat the call with the same key and the same body, you get the stored
    response (with `Idempotent-Replay: true`). With the same key and a different
    body, the response is `409`.
servers:
  - url: https://api.connectadesk.com/api/v1
    description: Production
security:
  - apiToken: []
tags:
  - name: contacts
    description: Contact records, extra fields and marketing source.
  - name: tickets
    x-displayName: Tickets
    description: Opening, transferring, closing and wrap-up of tickets.
  - name: messages
    description: Asynchronous sending and reading of messages.
  - name: tags
    description: Tags and their link to tickets.
  - name: queues
    description: Service queues and their agents.
  - name: wrapups
    description: Wrap-up types.
  - name: users
    description: Agents and administrators.
  - name: schedules
    description: Scheduled messages.
  - name: quick-messages
    description: Quick replies.
  - name: campaigns
    description: Bulk sending.
  - name: crm
    description: >-
      Boards, stages, cards and activities. The CRM numbers are in the dashboard
      (`/reports/dashboard/crm`).
  - name: channels
    description: Channels (read only).
  - name: reports
    description: Reports and dashboards.
  - name: products
    description: Product catalog, categories and sales performance.
  - name: custom-fields
    description: Custom fields for contacts and cards, plus company-wide global variables.
  - name: profiles
    description: Company permission profiles (read only).
  - name: webchat
    description: >-
      Native webchat from your own system: open a visitor session, send and read
      messages. The token needs the `webchat` scope (GET and POST).
paths:
  /reports/dashboard/monitoring/queues/{queueId}:
    get:
      tags:
        - reports
      summary: 'Dashboard: a queue in Monitoring'
      description: >-
        The queue's numbers right now, its users and the protocols open in it.
        `none` returns the protocols still without a queue.
      parameters:
        - name: queueId
          in: path
          required: true
          description: Queue id, or `none`. A queue from another company returns `404`.
          schema:
            type: string
        - $ref: '#/components/parameters/dashboardQueues'
        - $ref: '#/components/parameters/dashboardChannels'
        - $ref: '#/components/parameters/dashboardProfiles'
        - $ref: '#/components/parameters/dashboardTimeMode'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/DashboardMonitoringQueueDetail'
        '403':
          description: >-
            The token does not have `GET` on the `reports` module
            (`ERR_API_FORBIDDEN_SCOPE`), or Monitoring is not enabled in the
            company's plan (`ERR_DASHBOARD_MONITOR_NOT_ENABLED`).
        '404':
          description: >-
            The queue is not from this company, does not exist or was deleted
            (`ERR_QUEUE_NOT_FOUND`).
components:
  parameters:
    dashboardQueues:
      name: queues
      in: query
      description: >-
        Queue ids, separated by commas. An id that is not from your company
        returns `422` (`ERR_API_INVALID_REFERENCE`).
      schema:
        type: string
      example: '7'
    dashboardChannels:
      name: channels
      in: query
      description: >-
        Connection ids, comma-separated. An id outside your company returns
        `422` (`ERR_API_INVALID_REFERENCE`).
      schema:
        type: string
      example: '4'
    dashboardProfiles:
      name: profiles
      in: query
      description: Ids of the users' profiles, comma-separated.
      schema:
        type: string
      example: '2'
    dashboardTimeMode:
      name: timeMode
      in: query
      description: >-
        `elapsed` counts elapsed time; `business` counts only each user's
        business hours.
      schema:
        type: string
        enum:
          - elapsed
          - business
        default: elapsed
  schemas:
    DashboardMonitoringQueueDetail:
      type: object
      description: >-
        A queue in Monitoring: its numbers right now, its users and the
        protocols open in it.
      properties:
        queue:
          $ref: '#/components/schemas/DashboardMonitoringQueueRow'
        openTickets:
          $ref: '#/components/schemas/DashboardMonitoringChats'
        users:
          type: object
          description: >-
            Users linked to the queue (even with nothing open) and those who
            handled conversations in it today without being linked, with the
            user and profile filters. Most protocols in service first. In
            `none`, only those who handled conversations.
          properties:
            rows:
              type: array
              items:
                allOf:
                  - $ref: '#/components/schemas/DashboardUserRef'
                  - type: object
                    properties:
                      online:
                        type: boolean
                        example: true
                      linked:
                        type: boolean
                        description: >-
                          Linked to the queue in their record. `false`: included
                          because they handled conversations in it today.
                        example: true
                      inService:
                        type: integer
                        description: Protocols open with the user in this queue right now.
                        example: 3
                      responseTime:
                        type: number
                        description: >-
                          In seconds: in each protocol, the average of the
                          user's responses today in this queue; then, the median
                          across protocols.
                        example: 110
                      queueWait:
                        type: number
                        description: >-
                          In seconds: median wait until service starts (from
                          entering the queue or from the end of the last
                          automation, whichever comes later), in the user's
                          protocols today in this queue.
                        example: 85
                      serviceTime:
                        type: number
                        description: >-
                          In seconds: in each protocol, the sum of the user's
                          segments in this queue (those ended today and the open
                          one, until now); then, the median.
                        example: 540
            total:
              type: integer
              description: Users in the list before the 200-row cap.
              example: 6
            truncated:
              type: boolean
              description: >-
                In business hours, `queueWait` and `serviceTime` are
                recalculated over a cap of protocols and segments; `true` when
                the cap was reached.
              example: false
    DashboardMonitoringQueueRow:
      type: object
      properties:
        queueId:
          type: integer
          nullable: true
          description: 'Null: open protocols still without a queue.'
          example: 7
        name:
          type: string
          nullable: true
          example: Comercial
        color:
          type: string
          nullable: true
          example: '#2563eb'
        users:
          type: integer
          example: 4
        usersOnline:
          type: integer
          example: 3
        inService:
          type: integer
          example: 6
        waiting:
          type: integer
          description: >-
            Waiting outside automation; protocols that automation holds in the
            queue count in `inAutomation`.
          example: 2
        inAutomation:
          type: integer
          description: >-
            Without a user and with automation active, even while waiting in the
            queue.
          example: 1
        finished:
          type: integer
          description: Closed today in the queue.
          example: 30
        total:
          type: integer
          description: Everything open in the queue right now.
          example: 9
        longestWait:
          type: number
          description: >-
            Longest wait among those waiting outside automation, in seconds,
            counted from entering the queue or from the end of the last
            automation, whichever comes later.
          example: 340
        longestResponseWait:
          type: number
          description: Longest wait for a reply in an ongoing ticket, in seconds.
          example: 180
        queueWaitAverage:
          type: number
          description: >-
            Average wait until service starts, today, in seconds; only the time
            outside automation (from entering the queue or from the end of the
            last automation, whichever comes later).
          example: 95
        responseTime:
          type: number
          description: >-
            In seconds: in each protocol, the average of today's human responses
            in this queue; then, the median across protocols.
          example: 130
        serviceTime:
          type: number
          description: Average duration of today's tickets, in seconds.
          example: 720
    DashboardMonitoringChats:
      type: object
      description: 'Monitoring Conversations sub-tab: protocols open right now.'
      properties:
        rows:
          type: array
          items:
            type: object
            properties:
              ticketId:
                type: integer
                example: 1287
              trakingId:
                type: integer
                nullable: true
                description: Current protocol.
                example: 5120
              uuid:
                type: string
                example: 7f3c2a10-5b1e-4c8e-9d0a-2f6b8e4c1a77
              contactId:
                type: integer
                example: 3021
              contactName:
                type: string
                example: Carlos Lima
              contactPicture:
                type: string
                nullable: true
              channelName:
                type: string
                nullable: true
                example: WhatsApp Vendas
              channelType:
                type: string
                nullable: true
                example: whatsapp
              queueId:
                type: integer
                nullable: true
                example: 7
              queueName:
                type: string
                nullable: true
                example: Comercial
              userId:
                type: integer
                nullable: true
                description: >-
                  Id of the user handling it (the one from `GET /users`); null
                  with no user or for someone no longer in the company.
                example: 3
              userName:
                type: string
                nullable: true
                example: Marina Alves
              status:
                type: string
                enum:
                  - waiting
                  - in_service
                  - in_automation
                example: in_service
              waitingReply:
                type: boolean
                description: The contact sent the last message and has not had a reply yet.
                example: true
              waitSeconds:
                type: number
                description: >-
                  Wait according to the state: waiting, since entering the queue
                  or the end of the last automation, whichever comes later; in
                  service, since the contact's message still without a reply; in
                  automation (even in a queue) or with no pending message, 0.
                example: 120
              waitFrozen:
                type: boolean
                description: >-
                  The wait received the business-hours discount
                  (`timeMode=business`).
                example: false
              serviceSeconds:
                type: number
                nullable: true
                example: 600
              responseAverage:
                type: number
                nullable: true
                description: >-
                  The protocol's average response time (TMER), in seconds: the
                  average of the reply waits the human side answered throughout
                  it. Null with no human response yet.
                example: 95
              queueWaitSeconds:
                type: number
                nullable: true
                description: >-
                  The protocol's queue wait (TMEA), in seconds: how long it
                  waited as waiting, outside automation (from entering the queue
                  or from the end of the last automation, whichever comes
                  later), until service started; if it is still waiting, the
                  current wait counts. Null in automation.
                example: 180
              lastCustomerReplyAt:
                type: string
                format: date-time
                nullable: true
              lastOperatorReplyAt:
                type: string
                format: date-time
                nullable: true
        total:
          type: integer
          description: Open protocols after the tab's filters, before the table's.
          example: 40
        summary:
          type: object
          description: >-
            The same protocols as `total`, by state (the same state as the
            summary cards). `waitingReply`: in service with the contact waiting
            for a reply.
          properties:
            waiting:
              type: integer
              example: 3
            inService:
              type: integer
              example: 30
            inAutomation:
              type: integer
              example: 7
            waitingReply:
              type: integer
              example: 4
        matched:
          type: integer
          example: 40
        truncated:
          type: boolean
          description: The read stopped at the scan cap (only with `timeMode=business`).
          example: false
    DashboardUserRef:
      type: object
      description: >-
        A user in the dashboard responses. `userId` is the id of the company
        membership (the `id` from `GET /users`). Users who left the company do
        not appear in the per-user lists; in open conversations, they appear
        with a null `userId`.
      properties:
        userId:
          type: integer
          nullable: true
          example: 3
        name:
          type: string
          example: Marina Alves
  securitySchemes:
    apiToken:
      type: http
      scheme: bearer
      description: API token in the `sk_live_…` format.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.