> ## 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: Service

> The numbers of the dashboard's Service tab for the period: the operation right now, indicators, outcomes, charts and the outcome per user. Requires the `reports` module.



## OpenAPI

````yaml /api-reference/openapi.en.yaml get /reports/dashboard/service
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/service:
    get:
      tags:
        - reports
      summary: 'Dashboard: Service'
      description: >-
        The numbers of the dashboard's Service tab for the period: the operation
        right now, indicators, outcomes, charts and the outcome per user.
        Requires the `reports` module.
      parameters:
        - $ref: '#/components/parameters/dashboardDateStart'
        - $ref: '#/components/parameters/dashboardDateEnd'
        - $ref: '#/components/parameters/dashboardUsers'
        - $ref: '#/components/parameters/dashboardQueues'
        - $ref: '#/components/parameters/dashboardChannels'
        - $ref: '#/components/parameters/dashboardTimeMode'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/DashboardService'
        '400':
          description: >-
            Period missing or not in the `YYYY-MM-DD` format
            (`ERR_DATE_NOT_DEFINED`), start after end
            (`ERR_DATE_INTERVAL_INVALID`) or longer than 365 days
            (`ERR_DATE_RANGE_TOO_LONG`).
components:
  parameters:
    dashboardDateStart:
      name: dateStart
      in: query
      required: true
      description: >-
        Start of the period, `YYYY-MM-DD`, in the company time zone. The period
        can be up to 365 days.
      schema:
        type: string
        format: date
      example: '2026-10-01'
    dashboardDateEnd:
      name: dateEnd
      in: query
      required: true
      description: End of the period, `YYYY-MM-DD` (the whole day counts).
      schema:
        type: string
        format: date
      example: '2026-10-31'
    dashboardUsers:
      name: users
      in: query
      description: >-
        User ids (the `id` from `GET /users`), comma-separated. A user outside
        your company returns `404` (`ERR_API_USER_NOT_FOUND`).
      schema:
        type: string
      example: 3,8
    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'
    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:
    DashboardService:
      type: object
      description: >-
        Service tab: the same numbers as the screen, for the requested period
        and filters.
      properties:
        now:
          type: object
          description: >-
            The operation right now: waiting, in service, in automation
            (protocols without a user and with an open automation segment, even
            while waiting in a queue; with no segment at all, by the
            conversation's automation flags), users online and capacity.
            Protocols in automation do not count as waiting.
        kpis:
          type: object
          description: >-
            Indicators for the period and the comparison with the previous
            period of the same length; for a period still in progress, the
            comparison is with the same elapsed time of the previous one. In a
            one-day period the series come by hour and `protocols.perHour` gives
            the hourly pace (in the others, `null`). Times are in seconds and
            use the median across protocols; the sides come separately as `bot`
            (automation: flow, AI and bot), `human` and `api`, and never enter
            each other's average.


            - `protocols`: the protocols that were in progress (ticket `open` or
            `pending`) at some point in the period or that closed in it. The
            series is the scenario of each day (or hour): the ones in progress
            in it or closed in it, each once per point — a protocol open for
            three days appears in all three, so the sum of the series is not the
            total.

            - `firstAnswer`: per protocol, from the contact's first message to
            each side's first response. `median` is the response that came first
            among the three. It counts the response given in the period. With
            `timeMode=business` only the human side discounts the work schedule
            of whoever responded.

            - `responseTime`: "contact asked / platform answered" pairs answered
            in the period. Within each protocol, the average of each side's
            pairs; then, the median across protocols. `median` is the average of
            the sides' medians, weighted by the number of protocols on each
            side.

            - `serviceTime`: from the conversation's first message (contact,
            user, automation or API; campaigns, schedules and automatic notices
            do not count) to closing, for protocols that were in progress in the
            period or closed in it. The time is whole, from the real start (even
            before the period), up to closing cut at the end of the period or
            now: a protocol open for days counts its days. `bot` and `human` are
            the time with automation and the time in service with users (only
            while the ticket is `open` with the person), cut at the same limit;
            the two do not add up to the total, because the queue wait is left
            out. Each point of the series applies the same rule up to the end of
            that day (or hour).

            - `botResolved`: the share of protocols closed in the period that
            automation wrapped up.
        outcomes:
          type: object
          description: >-
            Outcome of the protocols that were in progress in the period (ticket
            `open` or `pending`) or that closed in it. The ones closed in the
            period, in this precedence: `bot` wrapped up by automation; `api`
            closed by the API (whoever closed counts, even with a user reply
            before); `human` closed with a reply from some user; `system` the
            rest (expired campaign, bulk or limit closing). The ones that did
            not close in the period, by their state at its end: `in_service` in
            service (ticket `open`), `in_automation` in automation, `waiting`
            waiting (`pending`: in the queue or waiting for acceptance). An
            outbound message with no reply and a closed ticket only counts when
            it closes. The sum of the outcomes is `all`.
          properties:
            all:
              type: integer
              example: 640
            bot:
              type: integer
              example: 120
            api:
              type: integer
              example: 12
            human:
              type: integer
              example: 438
            system:
              type: integer
              example: 30
            in_service:
              type: integer
              example: 31
            in_automation:
              type: integer
              example: 4
            waiting:
              type: integer
              example: 5
            open:
              type: integer
              deprecated: true
              description: >-
                The ones that did not close in the period: the sum of
                `in_service`, `in_automation` and `waiting`. Kept for older
                integrations.
              example: 40
        panels:
          type: object
          description: >-
            Series and distributions for the tab's charts (by day, by hour, by
            connection, by queue and by wrap-up), one slice per outcome: `all`,
            `bot`, `api`, `human`, `system`, `in_service`, `in_automation` and
            `waiting` (the ones in `outcomes`). Messages and templates count
            every protocol of the period, including an outbound message with no
            reply, which only appears in the `all` slice. The queue is the
            protocol's (its last queue, kept at closing).


            - `volume.byDay` and `volume.byHour` are the scenario of each day
            (or hour): a protocol counts once in each state it went through in
            it (`in_service`, `in_automation`, `waiting`) and, on the day (or
            hour) it closed, also in its outcome (`bot`, `api`, `human`,
            `system`). That is why the sum of the bands is not a protocol count.
            In a multi-day period, `byHour` counts each protocol once per state
            in each hour of the day, even if it went through that hour on
            several days. In a slice, only its own band. `volume.total` is the
            slice's protocol total in the period; `volume.previous`, the one for
            the previous period of the same length (for a period still in
            progress, the same elapsed time of the previous one).

            - `contacts`: the contacts that started interacting in the period,
            through the protocols that went in progress (ticket `open` or
            `pending`) for the first time within it. Each protocol counts only
            once, on the day (and hour) that happened: one already in progress
            before the period does not count in it, and one that never went in
            progress (an outbound message with no reply) does not count in any
            period. `contacts.protocols` is those protocols (the basis of
            "protocols per contact"). In `contacts.byDay` and `contacts.byHour`,
            `value` is the distinct contacts of the day (or hour), and `new` +
            `recurring` add up to that total; both series come complete, with
            zero where nobody entered (`byHour` with all 24 hours, or up to the
            current hour for today's period). A new contact (created within the
            period) counts only once, on the day of its first protocol in the
            period (in an outcome slice, on the first one with that outcome), so
            the sum of `new` across the series is the slice's `contacts.new`.

            - `heatmap`: inbound protocols opened in the period, by weekday
            (`dow`, 0 = Sunday) and hour, in the company time zone. `queues`
            lists the three queues with the most protocols in the cell, from
            largest to smallest (null `queueId` and `name` = no queue); `count`
            is the cell's total, across all queues.

            - `messages`: `sent` is what the operation sent (users, automation
            and system), `api` is what the API sent, counted separately, and
            `received` is what the contact sent; the same applies to `byDay`,
            `byHour` and `byChannel`. `avgPerProtocol` counts all three.

            - `templates`: `delivered` is delivered or read; `billed`, delivered
            and billable. In `byConnection[].rows[]`, `cost` is `billed ×
            price`: a free delivery costs nothing.
        usersOutcome:
          type: array
          description: Outcome per user.
          items:
            allOf:
              - $ref: '#/components/schemas/DashboardUserRef'
              - type: object
                properties:
                  goalAchieved:
                    type: integer
                    example: 52
                  goalMissed:
                    type: integer
                    example: 4
                  doubt:
                    type: integer
                    example: 2
                  inService:
                    type: integer
                    description: >-
                      The person's protocols in service with them (ticket
                      `open`) at the end of the period.
                    example: 6
                  others:
                    type: integer
                    example: 1
    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.