Skip to content

Retrieve team metrics

Request

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.

Security
bearerAuth
Path
team_idstringrequired

The unique identifier of the team to retrieve metrics for. Use GET /teams to list available team IDs.

Example:42
Query
idle_thresholdinteger

The number of seconds after which an open conversation is considered idle. Clamped to the range 1–86400. Defaults to 1800 (30 minutes).

Default:1800
Example:idle_threshold=1800
Headers
Intercom-Versionstring(intercom_version)

Intercom API version.
By default, it's equal to the version set in the app package.

Default:"2.16"
Enum:"1.0""1.1""1.2""1.3""1.4""2.0""2.1""2.2""2.3""2.4"
Example:2.16
package main

import (
  "fmt"
  "net/http"
  "io/ioutil"
)

func main() {
  teamId := "42";
  reqUrl := "https://api.intercom.io/teams/" + teamId + "/metrics"
  req, err := http.NewRequest("GET", reqUrl, nil)

  query := req.URL.Query()
  query.Add("idle_threshold", "1800")
  req.URL.RawQuery = query.Encode()

  if err != nil {
    panic(err)
  }
  req.Header.Add("Intercom-Version", "2.16")
  req.Header.Add("Authorization", "Bearer <YOUR_TOKEN_HERE>")
  res, err := http.DefaultClient.Do(req)
  if err != nil {
    panic(err)
  }
  defer res.Body.Close()
  body, err := ioutil.ReadAll(res.Body)
  if err != nil {
    panic(err)
  }

  fmt.Println(res)
  fmt.Println(string(body))
}

Responses

Successful response

Bodyapplication/json
typestring
Example:"team_metric.list"
dataArray of objects(team_metric)
Response
{ "type": "team_metric.list", "data": [ {}, {} ] }