---
title: "Update alert rule"
method: PUT
path: "/api-public/v1/alertRules/{ruleId}"
tags: ["Alert Rules"]
---

# Update alert rule

`PUT /api-public/v1/alertRules/{ruleId}`

Updates the alert rule for an organization.

This API may be called a maximum of 2 times per second.

## Path parameters

- `ruleId` string, required

## Headers

- `X-VO-Api-Id` string, required
- `X-VO-Api-Key` string, required

## Request body

- RuleAndAnnotationsPayload
  - `alertField` string
  - `alertValueMatch` string
  - `matchType` 'WILDCARD' | 'REGEX'
  - `stopFlag` boolean
  - `notes` string — Description of the alert rule
  - `rank` number
  - `routingKey` string
  - `annotations` AnnotationPayload[]
    - `annotationType` string — Allowed values for this are ['i', 's', 'u'] i -> image u -> url s -> notes
    - `fieldName` string
    - `fieldValue` string
    - `flags` number — To determine whether it is an annotation or transformation field. If flag is 1, it is a transformation. If flag is 0, it is an annotation.

## Response `200`

The updated alert rule

- AlertRulesResponse
  - `id` number
  - `alertField` string
  - `alertValueMatch` string
  - `matchType` 'WILDCARD' | 'REGEX'
  - `rank` number
  - `stopFlag` boolean
  - `lastUpdated` number
  - `lastUpdatedBy` string
  - `notes` string
  - `routeKey` string
  - `annotations` Annotation[]
    - `id` number
    - `annotationType` string
    - `fieldName` string
    - `fieldValue` string
    - `flags` number

## Other responses

- `400` — Problem with the request arguments. The response payload may include an error message.
- `401` — Authentication parameters missing
- `403` — Authentication failed or rate-limit reached
- `404` — User not found
- `500` — Internal Server Error

---

[API](https://skmtc.net/victorops/apis/victorops-api.md) · [All operations](https://skmtc.net/victorops/apis/victorops-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/victorops/victorops-api/versions/7a7391256058/schema)
