---
title: "Replace Notification Rule"
method: PUT
path: "/api/agent/deployments/{deploymentId}/actions/{notificationRuleId}"
tags: ["NotificationRulesService"]
---

# Replace Notification Rule

`PUT /api/agent/deployments/{deploymentId}/actions/{notificationRuleId}`

Replace a notification rule

## Path parameters

- `deploymentId` integer, required
- `notificationRuleId` integer, required

## Request body

- ProtosNotificationRulesV1ReplaceNotificationRuleRequest — Update
  - `deploymentId` integer
  - `notificationRuleId` integer
  - `notificationRule` ProtosNotificationRulesV1NotificationRule
    - `id` integer
    - `channel` string
    - `config` object
    - `is_enabled` boolean
    - `name` string
    - `policy_slugs` string[]
    - `use_network_broker` boolean
    - `config_error` string — Populated when stored config cannot build a notifier (e.g. invalid URL). Omitted when healthy.
    - `send_scan_completion` boolean — When true, this webhook is sent an event each time a scan completes. Defaults to true for new rules. Only meaningful for CHANNEL_WEBHOOK.

## Response `200`

OK

- ProtosNotificationRulesV1ReplaceNotificationRuleResponse
  - `notification_rule` ProtosNotificationRulesV1NotificationRule
    - `id` integer
    - `channel` string
    - `config` object
    - `is_enabled` boolean
    - `name` string
    - `policy_slugs` string[]
    - `use_network_broker` boolean
    - `config_error` string — Populated when stored config cannot build a notifier (e.g. invalid URL). Omitted when healthy.
    - `send_scan_completion` boolean — When true, this webhook is sent an event each time a scan completes. Defaults to true for new rules. Only meaningful for CHANNEL_WEBHOOK.

---

[API](https://skmtc.net/semgrep/apis/semgrep-web-app.md) · [All operations](https://skmtc.net/semgrep/apis/semgrep-web-app/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/semgrep/semgrep-web-app/versions/6483eeecd582/schema)
