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

---

[API](https://skmtc.net/comet-ml/apis/opik-rest-api.md) · [All operations](https://skmtc.net/comet-ml/apis/opik-rest-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/comet-ml/opik-rest-api/versions/4ed2fbc97cc3/schema)
