# Retrieve team metrics

`GET /teams/{team_id}/metrics`

> This is a subset of the full specification, limited to the `GET /teams/{team_id}/metrics` operation.
>
> You can find the full specification here: /_bundle/docs/references/@2.18/rest-api/api.intercom.io.yaml

```yaml
openapi: 3.0.1
info:
  title: Intercom API
  version: '2.18'
  description: This is a subset of the full specification, limited to the `GET /teams/{team_id}/metrics` operation.
  contact:
    name: Intercom Developer Hub
    url: https://developers.intercom.com
  license:
    name: MIT
    url: https://spdx.org/licenses/MIT
servers:
  - url: https://api.intercom.io
    description: The production API server
  - url: https://api.eu.intercom.io
    description: The european API server
  - url: https://api.au.intercom.io
    description: The australian API server
security:
  - bearerAuth: []
tags:
  - name: Teams
    description: Everything about your Teams
paths:
  /teams/{team_id}/metrics:
    get:
      summary: Retrieve team metrics
      parameters:
        - name: Intercom-Version
          in: header
          schema:
            $ref: '#/components/schemas/intercom_version'
        - name: team_id
          in: path
          required: true
          description: The unique identifier of the team to retrieve metrics for. Use `GET /teams` to list available team IDs.
          example: '42'
          schema:
            type: string
        - name: idle_threshold
          in: query
          required: false
          description: The number of seconds after which an open conversation is considered idle. Clamped to the range 1–86400. Defaults to 1800 (30 minutes).
          schema:
            type: integer
            default: 1800
            example: 1800
      tags:
        - Teams
      operationId: getTeamMetrics
      description: |
        Returns real-time activity metrics for admins in the specified team. For each admin, the response includes counts of open, idle, and snoozed conversations.

        This endpoint requires the `realtime_monitoring` feature to be enabled for your workspace.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/team_metric_list'
              examples:
                successful_response:
                  value:
                    type: team_metric.list
                    data:
                      - type: team_metric
                        admin_id: '123'
                        open: 5
                        idle: 2
                        snoozed: 1
                      - type: team_metric
                        admin_id: '456'
                        open: 3
                        idle: 0
                        snoozed: 2
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          description: Feature not enabled
          content:
            application/json:
              examples:
                feature_disabled:
                  value:
                    type: error.list
                    request_id: req-456
                    errors:
                      - code: api_plan_restricted
                        message: Real-time monitoring is not enabled for your workspace.
              schema:
                $ref: '#/components/schemas/error'
        '404':
          description: Team not found
          content:
            application/json:
              examples:
                team_not_found:
                  value:
                    type: error.list
                    request_id: req-789
                    errors:
                      - code: team_not_found
                        message: Team not found
              schema:
                $ref: '#/components/schemas/error'
components:
  schemas:
    team_metric:
      type: object
      description: Per-admin activity metrics within a team.
      properties:
        type:
          type: string
          example: team_metric
        admin_id:
          type: string
          description: The unique identifier for the admin.
          example: '123'
        open:
          type: integer
          description: The number of open conversations assigned to the admin.
          example: 5
        idle:
          type: integer
          description: The number of idle conversations assigned to the admin. A conversation is idle when it has been open and waiting for an admin reply longer than the idle_threshold.
          example: 2
        snoozed:
          type: integer
          description: The number of snoozed conversations assigned to the admin.
          example: 1
    team_metric_list:
      type: object
      description: A list of team metrics.
      properties:
        type:
          type: string
          example: team_metric.list
        data:
          type: array
          items:
            $ref: '#/components/schemas/team_metric'
    error:
      type: object
      title: Error
      description: The API will return an Error List for a failed request, which will contain one or more Error objects.
      properties:
        type:
          type: string
          description: The type is error.list
          example: error.list
        request_id:
          type: string
          nullable: true
          format: uuid
          description: ''
          example: f93ecfa8-d08a-4325-8694-89aeb89c8f85
        errors:
          type: array
          description: An array of one or more error objects
          items:
            properties:
              code:
                type: string
                description: A string indicating the kind of error, used to further qualify the HTTP response code.
                example: unauthorized
              message:
                type: string
                nullable: true
                description: Optional. Human readable description of the error.
                example: Access Token Invalid
              data:
                type: object
                nullable: true
                additionalProperties: true
                description: Optional. Extra detail about the error, for example `required_permissions` on a 403 `action_forbidden` error.
                example:
                  required_permissions:
                    - read_conversations
            required:
              - code
      required:
        - type
        - errors
    intercom_version:
      description: Intercom API version.</br>If you omit the header, the API uses the version set in your app package, and 1.0 if none is set.
      type: string
      example: '2.18'
      enum:
        - '1.0'
        - '1.1'
        - '1.2'
        - '1.3'
        - '1.4'
        - '2.0'
        - '2.1'
        - '2.2'
        - '2.3'
        - '2.4'
        - '2.5'
        - '2.6'
        - '2.7'
        - '2.8'
        - '2.9'
        - '2.10'
        - '2.11'
        - '2.12'
        - '2.13'
        - '2.14'
        - '2.15'
        - '2.16'
        - '2.17'
        - '2.18'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
  responses:
    Unauthorized:
      description: Unauthorized
      content:
        application/json:
          examples:
            Unauthorized:
              value:
                type: error.list
                request_id: 12a938a3-314e-4939-b773-5cd45738bd21
                errors:
                  - code: unauthorized
                    message: Access Token Invalid
          schema:
            $ref: '#/components/schemas/error'
```
