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",
      "slug": "<string>",
      "metricId": "<string>",
      "name": "<string>",
      "description": "<string>",
      "values": [
        {
          "computedAt": "2023-11-07T05:31:56Z",
          "value": 123,
          "callId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
          "chatId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
          "errorMessage": "<string>",
          "valueReasoning": "<string>",
          "confidence": 0.5,
          "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)

status
enum<string>
default:success

Filter metrics by capture status. success (default) returns only successfully computed metrics — backwards-compatible with the historical behavior. all also returns NOT_APPLICABLE / DATA_MISSING / ERROR rows (with value omitted), so clients can distinguish "still computing" from "computed but no value" and exit retry loops correctly.

Available options:
success,
all

Response

Metrics for a specific chat

data
object[]
required

Conversation metrics response payload grouped by metric definition