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 a new metric policy

name
string
required

Name of the metric policy

Minimum string length: 1
Example:

"Evaluate all inbound calls"

modality
enum<string>
required

Modality this policy targets. A policy fires for exactly one modality and can only reference metrics that support that modality.

Available options:
call,
chat
Example:

"call"

metrics
object[]
required

Metric definitions to collect when this policy matches

Minimum array length: 1
status
enum<string>
default:ACTIVE

Status of the policy (default: ACTIVE)

Available options:
ACTIVE,
INACTIVE
Example:

"ACTIVE"

conditions
object[]

Condition groups. Omit to match all calls.

Response

The created metric policy

data
object
required

A metric policy defining when metrics should be collected