Query agent metric

POST
/beta/intelligence/agents/metrics/{metricId}

Get the value of an agent metric for a period. All aggregates of the metric are returned. If nothing matches, count is 0 and the other aggregates are null, except presence durations, which are 0. Deactivated agents are included.

Authorization

ApiKeyAuth
headerAuthorization<token>

Path Parameters

metricId*string

The id of an agent metric

Request Body

The query

application/json
  1. body

An agent metric query

primaryFilter*

The period to query

filters?array<>

The filters to apply. All filters must match

timezone*string

The timezone presets and days are evaluated in, such as Europe/Copenhagen

Response Body

The metric values, keyed by aggregate name

application/json
  1. response
data*

The metric values, keyed by the name of each of the metric's aggregates. All aggregates are included. If nothing matches, count is 0, min, max, sum, average, stdDev and percentage are null, and an object value is filled with zeros

curl -X POST 'https://dev.dixa.io/beta/intelligence/agents/metrics/agentPresenceDuration' \  -H 'Authorization: <API token>' \  -H 'Content-Type: application/json' \  -d '{  "primaryFilter": {    "period": {      "interval": {        "from": "2026-06-01T00:00:00Z",        "to": "2026-07-01T00:00:00Z"      }    }  },  "timezone": "Europe/Copenhagen"}'
{
"data": {
"working": {
"durationMs": 18420000,
"availability": {
"email": 18420000,
"chat": 18420000,
"message": 12300000,
"speak": 0
}
},
"away": {
"durationMs": 5400000,
"byStatus": [
{
"customAwayStatus": {
"id": "3c6f2a18-8d47-4b93-a05e-2f7c9b1d6a38",
"label": "Lunch"
},
"durationMs": 1800000
},
{
"durationMs": 3600000
}
]
}
}
}

Time working, per channel the agent was available on, and time away, per away status