---
title: "Update alert"
method: PUT
path: "/v1/private/alerts/{id}"
tags: ["Alerts"]
---

# Update alert

`PUT /v1/private/alerts/{id}`

Update alert

## Path parameters

- `id` string, uuid, required

## Request body

- AlertWrite
  - `id` string, uuid
  - `name` string
  - `enabled` boolean
  - `alert_type` 'general' | 'slack' | 'pagerduty'
  - `metadata` object
  - `webhook` WebhookWrite, required
    - `id` string, uuid
    - `name` string
    - `url` string, required
    - `secret_token` string
    - `headers` object
  - `triggers` AlertTriggerWrite[]
    - `id` string, uuid
    - `event_type` 'trace:errors' | 'trace:feedback_score' | 'trace_thread:feedback_score' | 'prompt:created' | 'prompt:committed' | 'trace:guardrails_triggered' | 'prompt:deleted' | 'experiment:finished' | 'trace:cost' | 'trace:latency', required
    - `trigger_configs` AlertTriggerConfigWrite[]
      - `id` string, uuid
      - `type` 'scope:project' | 'threshold:feedback_score' | 'threshold:cost' | 'threshold:latency' | 'threshold:errors' | 'filter:guardrail_type', required
      - `config_value` object
      - `group_index` integer — Groups configs within a trigger: same group_index means AND between configs, different group_index means OR between groups. Null means a legacy/singleton group of one config. Always null for scope:project configs.
  - `project_id` string, uuid — Optional project scope for this alert. When set, the alert is scoped to the specified project. Do NOT also provide a 'scope:project' trigger config — the system will create it automatically from this field. Sending both project_id and a scope:project trigger config will result in an error.

## Response `204`

No Content

## Other responses

- `400` — Bad Request
- `409` — Conflict
- `422` — Unprocessable Content

## Changes

- **2026-07-24** `b9b9c770fc73` — 1 info
  - added the new `filter:guardrail_type` enum value to the request property `triggers/items/trigger_configs/items/type`
- **2026-05-22** `a0faec951d6a` — 1 info
  - added the new optional request property `triggers/items/trigger_configs/items/group_index`
- **2026-05-04** `d606e84c75e4` — 1 warning
  - removed the request property `triggers/items/trigger_configs/items/group_index`

[Change history](https://skmtc.dev/comet-ml/apis/opik-rest-api/changes/v1/private/alerts/:id/put.md)

---

[API](https://skmtc.dev/comet-ml/apis/opik-rest-api.md) · [All operations](https://skmtc.dev/comet-ml/apis/opik-rest-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/comet-ml/opik-rest-api/revisions/0739fa5022ca/schema)
