---
title: "Partially updates alarm rules"
method: PATCH
path: "/v1/enterprise/{enterprise_id}/alarmrules/{alarm_id}/"
tags: ["esper_cloud_api_Alarms"]
---

# Partially updates alarm rules

`PATCH /v1/enterprise/{enterprise_id}/alarmrules/{alarm_id}/`

⚠️ Android only. 

Partially updates one or more fields of an existing alarm rule identified by its UUID alarm_id. Only the fields included in the request body are modified — omitted fields retain their current values. Use this endpoint instead of PUT when making a targeted change to a single field without needing to resend the full rule object.

**Request body fields (all optional for PATCH)**

enterprise — UUID of the enterprise

name — Display name for the rule

metric — The device metric to monitor

conditions — Threshold definition object containing value, unit, comparator, and toggle_state

realert_interval — Interval in minutes before re-alerting if the condition persists

description — Human-readable description of the rule's purpose

devices — Array of specific device UUIDs to monitor

groups — Array of device group UUIDs to monitor

alert_channels — Array of alert channel UUIDs to notify when the rule fires

action_emails — Array of email addresses to notify directly

actions — Array of actions to perform when the rule fires

is_active — Whether the rule is enabled

repeat_times — Number of times to repeat the alert

**Common use cases**

Toggling is_active to quickly enable or disable a rule without touching any other configuration

Updating realert_interval to tune alert frequency without modifying threshold conditions

Adding or replacing alert_channels or action_emails when notification routing changes

Adjusting conditions thresholds as device fleet behavior or monitoring standards evolve

**Best practices**

Prefer this endpoint over PUT for targeted changes — it reduces payload size and eliminates the risk of accidentally clearing fields that are not included in the body

Note that array fields such as alert_channels, devices, and groups are fully replaced when included — if adding to an existing array, retrieve the current values first via GET /alarmrules/{alarm_id}/ and include them all in the patch body

alarm_id is a UUID, not an integer — use GET /alarmrules/ with the name filter to look it up if needed.

## Path parameters

- `enterprise_id` string, required
- `alarm_id` string, required

## Request body

- EsperCloudApiUpdateAlarmRule
  - `id` string, uuid
  - `enterprise` string, uuid, required
  - `devices` unknown[]
    - unknown
  - `groups` string[]
  - `name` string, required
  - `description` string
  - `metric` string, required
  - `conditions` object, required
    - `value` number, double
    - `unit` string
    - `comparator` string
    - `toggle_state` boolean
  - `action_emails` string[]
  - `actions` string[]
  - `alert_channels` string[]
  - `created_on` string, date-time
  - `updated_on` string, date-time
  - `is_active` boolean
  - `realert_interval` integer, required
  - `repeat_times` integer
  - `trigger_count` integer
  - `daily_trigger_count` integer

## Response `200`

successful operation

- EsperCloudApiAlarmRule
  - `id` string, uuid
  - `enterprise` string, uuid
  - `devices` object
    - `id` string, uuid
    - `device_name` string
    - `alias_name` string, nullable
  - `groups` string[]
  - `name` string
  - `description` string
  - `metric` string
  - `conditions` object
    - `value` number, double
    - `unit` string
    - `comparator` string
    - `toggle_state` boolean
  - `action_emails` string[]
  - `actions` string[]
  - `alert_channels` string[]
  - `created_on` string, date-time
  - `updated_on` string, date-time
  - `is_active` boolean
  - `realert_interval` integer
  - `repeat_times` integer
  - `trigger_count` integer
  - `daily_trigger_count` integer

## Other responses

- `400` — Invalid request.
- `401` — Authorization information is missing or invalid.
- `404` — Not Found.
- `500` — Internal server error

---

[API](https://skmtc.net/esper/apis/esper-api-reference.md) · [All operations](https://skmtc.net/esper/apis/esper-api-reference/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/esper/esper-api-reference/revisions/e1f64cbb488e/schema)
