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.

sourceValues
enum<string>

Where thresholds get the figures they compare. MEASURE (default) measures their source metrics again in the job. STORED compares the figures already stored for each conversation with the threshold's current limit and measures nothing, so it costs nothing: use it after changing a limit. STORED takes thresholds (and other metrics derived from another metric) only; a conversation with no stored figure is skipped.

Available options:
STORED,
MEASURE
Example:

"STORED"

Response

What the job would grade and cost

data
object
required

What a metric collection job would grade and cost, worked out without creating it