Update the editable subset of a custom metric definition, addressed by its UUID or its stable metricId slug. Every update creates a new immutable version; the response carries the advanced versionId. System metrics and immutable fields (scope, outputType, calcType, …) are rejected. Which fields are editable depends on the metric (e.g. derived metrics only allow name).
Documentation Index
Fetch the complete documentation index at: https://docs.roark.ai/llms.txt
Use this file to discover all available pages before exploring further.
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Editable subset of a metric definition. Every update creates a new immutable version. Immutable fields (metricId, scope, outputType, calcType, …) are rejected with a 400.
New name (only for metrics whose name is editable)
1 - 100New LLM prompt (only for LLM_JUDGE metrics whose prompt is editable)
2000New scale minimum (SCALE output only)
0 <= x <= 100New scale maximum (SCALE output only)
0 <= x <= 100Replacement set of scale-range labels (SCALE output only)
New label for the true case (BOOLEAN output only)
New label for the false case (BOOLEAN output only)
Replacement set of classification options (CLASSIFICATION output only)
1New maximum number of classifications (CLASSIFICATION output only)
x >= 1Replacement set of scoped tool-definition ids (only for metrics whose tool scoping is editable)
Replacement set of supported contexts. Omit to leave unchanged.
1CALL, SEGMENT, TURN New formula expression (FORMULA only). Pass sources alongside if the referenced metrics change.
1 - 500Replacement formula sources, required when formula changes the referenced metrics (FORMULA only).
Optional free-text audit note recorded on the new version.
The updated metric definition (with versionId advanced to the new version)
Metric definition data