> ## 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 policy create

> Create a metric policy

Creates a new metric policy. Policies define which metrics to collect and under what conditions.

```bash Synopsis theme={"theme":{"light":"everforest-light","dark":"everforest-dark"}}
roark metric policy create [options]
```

> [!NOTE]
>
> Calls `POST /v1/metric/policies`

## Options

**--name** `string` *required*

Name of the metric policy.

**--status** `string`

Status of the policy (default: ACTIVE). One of `ACTIVE`, `INACTIVE`

**--modality** `string` *required*

Modality this policy targets. A policy fires for exactly one modality and can only reference metrics that support that modality. One of `call`, `chat`

**--conditions** `array`

Condition groups. Omit to match all calls.

**--metrics** `array` *required*

Metric definitions to collect when this policy matches, each with an optional setting.

## Example

```bash theme={"theme":{"light":"everforest-light","dark":"everforest-dark"}}
roark metric policy create --name <value> --modality <value> --metrics <value>
```

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


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