Home//
REST API Reference
/- Retrieve team metrics
List all teams
Retrieve a team
Team
Retrieve team metrics
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
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
- The production API serverhttps://api.intercom.io/teams/{team_id}/metrics
- The european API serverhttps://api.eu.intercom.io/teams/{team_id}/metrics
- The australian API serverhttps://api.au.intercom.io/teams/{team_id}/metrics
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))
}Successful response
dataArray of objects(team_metric)
Response
{ "type": "team_metric.list", "data": [ { … }, { … } ] }