---
title: "Delete an alert rule"
method: DELETE
path: "/api/v1/realtime/{alert_rule_id}"
tags: ["realtime"]
---

# Delete an alert rule

`DELETE /api/v1/realtime/{alert_rule_id}`

Delete a real-time VLM alert rule.

The rule is removed from storage first, so it disappears from list/get even if RTVI VLM is unreachable.

### What gets stopped
- Caption generation for this rule is **always** stopped.
- The shared RTVI stream is stopped **only** if this was the last rule using it. If other rules still share the stream (same `sensor_id`), it keeps running for them.

### When you might get blocked
While `POST /api/v1/realtime/replay` is running, this endpoint returns `503 replay_in_progress`.

## Path parameters

- `alert_rule_id` string, uuid, required

## Response `200`

Alert rule deleted

- RealtimeAlertDeleteResponse — Response for DELETE /api/v1/realtime/{alert_rule_id}.
  - `status` string
  - `id` string, required
  - `message` string, required

## Other responses

- `404` — Alert rule not found (`not_found`).
- `422` — Invalid UUID format
- `502` — Upstream failure. Possible `error` codes: `elasticsearch_query_failed` (failed to read the rule before delete), `elasticsearch_write_failed` (failed to delete the rule). RTVI teardown failures are logged but do not surface as 502 — they leave the stream as a tracked orphan.
- `503` — Replay in progress — rule deletion is gated until `POST /api/v1/realtime/replay` finishes (error code `replay_in_progress`).

---

[API](https://skmtc.dev/nvidia/apis/alert-agent-api.md) · [All operations](https://skmtc.dev/nvidia/apis/alert-agent-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/nvidia/alert-agent-api/revisions/e754ab3efedd/schema)
