Skip to main content
GET
/
v1
/
chat
/
{id}
/
metrics
List chat metrics
curl --request GET \
  --url https://api.roark.ai/v1/chat/{id}/metrics \
  --header 'Authorization: Bearer <token>'
{
  "data": [
    {
      "metricDefinitionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "metricId": "<string>",
      "name": "<string>",
      "description": "<string>",
      "type": "COUNT",
      "scope": "GLOBAL",
      "values": [
        {
          "value": 123,
          "context": "CALL",
          "confidence": 0.5,
          "computedAt": "2023-11-07T05:31:56Z",
          "participantRole": "agent",
          "valueReasoning": "<string>",
          "policyIds": [
            "3c90c3cc-0d44-4b50-8888-8dd25736052a"
          ],
          "segment": {
            "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
            "text": "<string>",
            "startOffsetMs": 123,
            "endOffsetMs": 123
          },
          "fromSegment": {
            "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
            "text": "<string>",
            "startOffsetMs": 123,
            "endOffsetMs": 123
          },
          "toSegment": {
            "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
            "text": "<string>",
            "startOffsetMs": 123,
            "endOffsetMs": 123
          }
        }
      ],
      "unit": {
        "name": "<string>",
        "symbol": "<string>"
      }
    }
  ]
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

id
string
required

Query Parameters

flatten
string

Whether to return a flat list instead of grouped by metric definition (default: false)

Response

Metrics for a specific chat

data
object[]
required

Conversation metrics response payload grouped by metric definition