Skip to content

Query conversation metric

Request

Compute a conversation-anchored metric over a period or a set of conversations. Every aggregate the catalogue advertises is returned, zero-valued when the query matched nothing.

Security
ApiKeyAuth
Path
metricIdstringrequired

A conversation-anchored metric id from List Metrics

Bodyapplication/jsonrequired

The metric query: its primary anchor, any secondary filters and the timezone

primaryFilterConversationIdsPrimaryFilter (object) or ConversationPeriodPrimaryFilter (object)(ConversationPrimaryFilter)required
One of:

Anchors the query on specific conversations; no period predicate is applied at all

filtersArray of objects(SecondaryFilter)

Absent means no secondary filtering

timezonestringrequired

The zone the period is evaluated in; an invalid zone is rejected as a 400

POST
/beta/intelligence/conversations/metrics/{metricId}
curl -i -X POST \
  'https://dev.dixa.io/beta/intelligence/conversations/metrics/{metricId}' \
  -H 'Authorization: YOUR_API_KEY_HERE' \
  -H 'Content-Type: application/json' \
  -d '{
    "primaryFilter": {
      "period": {
        "interval": {
          "from": "2026-06-01T00:00:00Z",
          "to": "2026-07-01T00:00:00Z"
        }
      }
    },
    "filters": [
      {
        "attribute": "queue",
        "values": [
          "2f9b6d51-38c4-4a72-9e15-7c8b3f6a2d90"
        ],
        "operator": "IsOne"
      },
      {
        "attribute": "initialDirection",
        "values": [
          "Inbound"
        ]
      }
    ],
    "timezone": "Europe/Copenhagen"
  }'

Responses

The computed aggregates, keyed by aggregate name

Bodyapplication/json
dataobjectrequired

The metric's computed values. Each key is an aggregate name from the metric's aggregates; every advertised aggregate is present even when the period matched nothing, zero-valued rather than omitted

Response
An event metric returns a single whole number
{ "data": { "count": 1284 } }