Create a threshold on a metric
Create a boolean threshold derived from an existing metric. The source metric is addressed by its UUID or its stable slug. The threshold fires when the source metric meets the comparison condition. Scope and supported contexts are inherited from the source metric.
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
The metric definition's Roark ID (UUID) or its stable slug (e.g. customer_satisfaction).
Body
Input for creating a new threshold derived from a source metric.
Comparison operator
GREATER_THAN, GREATER_THAN_OR_EQUALS, LESS_THAN, LESS_THAN_OR_EQUALS, EQUALS, NOT_EQUALS "GREATER_THAN_OR_EQUALS"
Value to compare the source metric against (as a string)
1"4"
Stable slug for the metric. Auto-generated from name if omitted.
1 - 50"customer_satisfaction"
Alias of slug accepted for backwards compatibility. Use slug for new integrations.
1 - 50"customer_satisfaction"
How to aggregate the source metric before applying the comparison (default: EACH)
EACH, COUNT, AVERAGE, MIN, MAX, MEDIAN, P95, P99, SUM Required when aggregationMode is COUNT. The threshold fires when the count is met.
x >= 0When the source metric is per-participant, restrict evaluation to this role. Only valid for sources with TURN/SEGMENT contexts.
AGENT, CUSTOMER, SIMULATED_CUSTOMER, BACKGROUND_SPEAKER Variant of the source metric to use
Response
The created threshold (as a metric definition)

