⚠️ 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.
- Mock serverhttps://api.esper.io/_mock/openapi/v1/enterprise/{enterprise_id}/alarmrules/{alarm_id}/
- https://develop-api.esper.cloud/apihttps://develop-api.esper.cloud/api/v1/enterprise/{enterprise_id}/alarmrules/{alarm_id}/
curl -i -X PATCH \
'https://api.esper.io/_mock/openapi/v1/enterprise/{enterprise_id}/alarmrules/{alarm_id}/' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"enterprise": "796caaf9-a7de-4817-9ffa-39d04bf83de9",
"devices": [
null
],
"groups": [
"string"
],
"name": "string",
"description": "string",
"metric": "string",
"conditions": {
"value": 0.1,
"unit": "string",
"comparator": "string",
"toggle_state": true
},
"action_emails": [
"user@example.com"
],
"actions": [
"string"
],
"alert_channels": [
"string"
],
"created_on": "2019-08-24T14:15:22Z",
"updated_on": "2019-08-24T14:15:22Z",
"is_active": true,
"realert_interval": 0,
"repeat_times": 0,
"trigger_count": 0,
"daily_trigger_count": 0
}'successful operation
{ "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "enterprise": "796caaf9-a7de-4817-9ffa-39d04bf83de9", "devices": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "device_name": "string", "alias_name": "string" }, "groups": [ "string" ], "name": "string", "description": "string", "metric": "string", "conditions": { "value": 0.1, "unit": "string", "comparator": "string", "toggle_state": true }, "action_emails": [ "user@example.com" ], "actions": [ "string" ], "alert_channels": [ "string" ], "created_on": "2019-08-24T14:15:22Z", "updated_on": "2019-08-24T14:15:22Z", "is_active": true, "realert_interval": 0, "repeat_times": 0, "trigger_count": 0, "daily_trigger_count": 0 }