> ## 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.

# roark metric definition update

> Update a metric definition

Update the editable subset of a custom metric definition, addressed by its UUID or its stable `slug`. Only the supplied fields are changed; omitted fields are left unchanged. Every update creates a new immutable version; the response carries the advanced `versionId`. Immutable fields (scope, outputType, calcType, …) are rejected, and which fields are editable depends on the metric (e.g. derived metrics only allow `name`). Roark's own metrics are rejected here: this endpoint edits the shared definition, which every workspace sees. To change one for your workspace alone, edit its variant with PUT /v1/metric/definitions/\{idOrSlug}/variants/\{variantId}, which forks it for you and leaves every other workspace on the original.

```bash Synopsis theme={"theme":{"light":"everforest-light","dark":"everforest-dark"}}
roark metric definition update <id-or-slug> [options]
```

> [!NOTE]
>
> Calls `PUT /v1/metric/definitions/{idOrSlug}`

## Arguments

**id-or-slug** `string` *required*

The metric definition's Roark ID (UUID) or its stable `slug` (e.g. `customer_satisfaction`).

## Options

**--name** `string`

New name (only for metrics whose name is editable).

**--llm-prompt** `string`

New LLM prompt (only for `LLM_JUDGE` metrics whose prompt is editable). A custom metric prompt must include a transcript variable such as `{{transcript}}` and `{{world_context}}`, which gives the judge the current date and time when it grades.

**--scale-min** `integer`

New scale minimum (SCALE output only).

**--scale-max** `integer`

New scale maximum (SCALE output only).

**--scale-labels** `array`

Replacement set of scale-range labels (SCALE output only).

**--boolean-true-label** `string`

New label for the true case (BOOLEAN output only).

**--boolean-false-label** `string`

New label for the false case (BOOLEAN output only).

**--applicability-condition** `string`

When this metric applies, in plain words (for example "the caller asks to stop being contacted"). BOOLEAN LLM metrics only. On a conversation that does not meet it, the metric records `captureStatus: NOT_APPLICABLE` instead of a verdict, and checks on it count only the conversations it applies to. Null or empty: it applies to every conversation. Send null or an empty string to remove it.

**--grades-short-calls** `switch`

Score this metric on a simulated call with fewer than 4 transcript lines or where your agent never spoke (custom metrics only, not ones that judge the audio). Such calls skip every other metric. Default false.

**--classification-options** `array`

Replacement set of classification options (CLASSIFICATION output only).

**--max-classifications** `integer`

New maximum number of classifications (CLASSIFICATION output only).

**--tool-definition-ids** `array`

Replacement set of scoped tool-definition ids (only for metrics whose tool scoping is editable). Repeatable.

**--supported-contexts** `array`

Replacement set of supported contexts. Omit to leave unchanged. Scope and participantRole cannot change after create, so moving to SEGMENT or TURN grading only works on a `PER_PARTICIPANT` metric (see create). One of `CALL`, `SEGMENT`, `TURN` Repeatable.

**--formula** `string`

New formula expression (FORMULA only). Pass `sources` alongside if the referenced metrics change.

**--sources** `array`

Replacement formula sources, required when `formula` changes the referenced metrics (FORMULA only).

**--http-request** `object`

Replacement request (`HTTP_REQUEST` only). Send the whole request; omitted headers are removed.

**--http-request.url** `string` *required*

Public http(s) URL. May contain \{\{path}} placeholders into the request payload, which are URL-encoded.

**--http-request.method** `string`

GET or POST (default POST). A GET request has no body. One of `GET`, `POST`

**--http-request.headers** `object`

Request headers, for example your own Authorization header. Values may contain placeholders.

**--http-request.body** `string`

A JSON template with \{\{path}} placeholders into the request payload, such as \{"cardId": "\{\{call.properties.cardId}}"}. Omit or pass null to send the default payload.

**--http-request.timeout-ms** `integer`

How long to wait for each attempt, in milliseconds. At most 300000. Omit or pass null for 30000.

**--http-request.max-attempts** `integer`

How many times to send the request before recording an error: once, plus retries after a timeout, a connection failure or an HTTP 5xx. At most 5. Omit or pass null for 3.

**--change-reason** `string`

Optional free-text audit note recorded on the new version.

**--slug** `string`

**--metric-id** `string`

**--source** `string`

**--organization-id** `string`

**--project-id** `string`

**--output-type** `string`

**--scope** `string`

**--participant-role** `string`

**--calc-type** `string`

**--supports-multiple-variants** `string`

**--analysis-package-id** `string`

## Example

```bash theme={"theme":{"light":"everforest-light","dark":"everforest-dark"}}
roark metric definition update <id-or-slug> --http-request.url <value>
```

Every command also takes the [global options](https://docs.roark.ai/cli-reference/overview.md#global-options) and sets one
of the [exit codes](https://docs.roark.ai/cli-reference/overview.md#exit-codes).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.