Update a monitor
Changes one or more of a monitor's editable fields through the same domain path as the dashboard's own edit forms. Every field is optional; omitted fields are left untouched, and description accepts null to clear it. url applies to Website/API/External Status Page monitors and host to Ping/IP/Port/DNS/SSL Certificate/Domain monitors — the one the monitor's type does not use is refused rather than silently ignored. request_timeout_seconds is a Website/API setting (null restores the 30-second default), and failure_threshold is refused for Manual, Incoming Request and Incoming Email monitors. heartbeat_interval_minutes and heartbeat_grace_minutes set the dead-man's-switch schedule of an Incoming Request monitor — how long silence may last before it is declared down — and are refused for every other type. data_check.api_key replaces a Data Check's upAPI key (write-only: it is stored with the monitor and never returned by any endpoint) and is refused for every other monitor type; a Data Check's operation and paths are not editable here. At least one field must be present. API monitors also take request_type, request_headers, request_body and do_not_follow_redirects (null clears the last three) and are refused for every other type; any monitor takes criteria, which replaces ALL of its criteria in the same write. To assert on a redirect, create the monitor as type API with do_not_follow_redirects: true and a criteria list. This criteria expects a 301 whose Location is https://stealthly.io/: [{"name":"Redirect is missing or wrong","filterCondition":"Any","monitorStatusName":"Offline","createIncidents":true,"incidents":[{"title":"Canonical redirect is not 301 to the right URL"}],"filters":[{"checkOn":"Is Online","filterType":"False"},{"checkOn":"Response Status Code","filterType":"Not Equal To","value":301},{"checkOn":"Response Header","filterType":"Not Contains","value":"location: https://stealthly.io/"}]},{"name":"Redirect is correct","filterCondition":"All","monitorStatusName":"Operational","filters":[{"checkOn":"Response Status Code","filterType":"Equal To","value":301},{"checkOn":"Response Header","filterType":"Contains","value":"location: https://stealthly.io/"}]}] Criteria are an ordered, first-match-wins list; a check that matches none falls back to Operational, so list the failing case first.
Authorization
bearerAuth An uptimely_live_ project API key (Settings → API Keys).
In: header
Path Parameters
Monitor id.
^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$uuidRequest Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
At least one field is required — an empty object is refused.
Response Body
application/json
application/problem+json
application/problem+json
application/problem+json
application/problem+json
application/problem+json
application/problem+json
curl -X PATCH "https://example.com/v1/monitors/497f6eca-6276-4993-bfeb-53cbbbba6f08" \ -H "Content-Type: application/json" \ -d '{}'{ "id": "string", "name": "string", "description": "string", "monitor_type": "string", "status": { "name": "string", "color": "string" }, "active_monitoring_disabled": true, "failure_threshold": -9007199254740991, "created_at": "2019-08-24T14:15:22Z", "updated_at": "2019-08-24T14:15:22Z"}