> ## Documentation Index
> Fetch the complete documentation index at: https://docs.devhelm.io/llms.txt
> Use this file to discover all available pages before exploring further.

# notification-policies

> DevHelm CLI notification-policies commands — list, get, create, update, delete, and test notification policies

Manage notification policies from the command line. Define match rules and connect policies to alert channels via escalation chains.

## Commands

| Command                                     | Description        |
| ------------------------------------------- | ------------------ |
| `devhelm notification-policies list`        | List all policies  |
| `devhelm notification-policies get <id>`    | Get policy details |
| `devhelm notification-policies create`      | Create a policy    |
| `devhelm notification-policies update <id>` | Update a policy    |
| `devhelm notification-policies delete <id>` | Delete a policy    |
| `devhelm notification-policies test <id>`   | Test a policy      |

## notification-policies list

```bash theme={null}
devhelm notification-policies list
```

| Flag          | Type    | Default | Description                             |
| ------------- | ------- | ------- | --------------------------------------- |
| `--page-size` | integer | `200`   | Number of items per API request (1–200) |

## notification-policies get

Policy and channel IDs are UUIDs — get them from the matching `list` commands.

```bash theme={null}
devhelm notification-policies get <policy-id> -o json
```

## notification-policies create

Create a new notification policy with associated alert channels.

```bash theme={null}
devhelm notification-policies create \
  --name "Production Alerts" \
  --channel-ids <channel-id-1>,<channel-id-2> \
  --enabled
```

| Flag                         | Type    | Required | Description                                                       |
| ---------------------------- | ------- | -------- | ----------------------------------------------------------------- |
| `--name`                     | string  | Yes      | Policy display name                                               |
| `--channel-ids`              | string  | —        | Comma-separated alert channel IDs (UUIDs) for the escalation step |
| `--enabled` / `--no-enabled` | boolean | —        | Whether the policy is active (default: `true`)                    |

<Note>
  The CLI creates the policy with a **single escalation step** (zero delay, the given channels) and **no match rules**, so it matches every incident. Multi-step escalation chains, delays, and match rules aren't expressible through these flags — define the policy in `devhelm.yml` (see [escalation chains](/alerting/escalation-chains)) and run `devhelm deploy`.
</Note>

## notification-policies update

```bash theme={null}
devhelm notification-policies update <policy-id> \
  --name "Production Alerts (critical)" \
  --channel-ids <channel-id-1>,<channel-id-2>
```

Supports the same flags as `create`. Passing `--channel-ids` replaces the escalation with a single zero-delay step containing those channels.

## notification-policies delete

Prompts for confirmation; pass `--yes` (`-y`) in scripts and CI.

```bash theme={null}
devhelm notification-policies delete <policy-id>
```

## notification-policies test

Send a test notification through the policy to verify it triggers correctly.

```bash theme={null}
devhelm notification-policies test <policy-id>
```

## Next steps

<CardGroup cols={2}>
  <Card title="Notification policies" icon="bell" href="/alerting/notification-policies">
    Understanding match rules and escalation logic.
  </Card>

  <Card title="Escalation chains" icon="arrow-up-right-dots" href="/alerting/escalation-chains">
    Multi-step escalation with delays and conditions.
  </Card>
</CardGroup>
