Skip to main content
POST
JavaScript

Authorizations

Authorization
string
header
required

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

Body

application/json

Input for creating and running a metric collection job. Limits: ≤500 conversations, ≤20 metrics, ≤5000 total items per request.

callIds
string<uuid>[]

Call IDs to collect metrics for. Mutually exclusive with chatIds. Max 500 per request.

Required array length: 1 - 500 elements
chatIds
string<uuid>[]

Chat IDs to collect metrics for. Mutually exclusive with callIds. Max 500 per request.

Required array length: 1 - 500 elements
metrics
object[]

Metric definitions to collect. Max 20 per request. Required unless policyId is given; with policyId, defaults to every metric that policy collects, and each one listed must be in it.

Required array length: 1 - 20 elements
policyId
string<uuid>

Optional. A metric policy (collector) whose settings to score with: each metric runs at the version that policy runs it at, with its per-collector setting (such as the properties Property Verification checks), instead of the metric's default. A metric the policy runs at its default runs at its default here too. The policy's conditions are not applied: the listed conversations are scored as given. Use it to re-score past conversations after changing a policy's settings.

Response

The created metric collection job

data
object
required

A metric collection job that processes metrics for calls or chats