Edit an uptime monitor
const url = 'https://api.overwatch.weareheavy.dev/v1/sites/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/uptime/monitors/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0';const options = { method: 'PATCH', headers: {'x-api-key': '<x-api-key>', 'Content-Type': 'application/json'}, body: '{"cadenceSeconds":300,"enabled":true}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PATCH \ --url https://api.overwatch.weareheavy.dev/v1/sites/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/uptime/monitors/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0 \ --header 'Content-Type: application/json' \ --header 'x-api-key: <x-api-key>' \ --data '{ "cadenceSeconds": 300, "enabled": true }'Edit a monitor; omitted fields keep their current value. Setting
enabled: false pauses probing immediately (the monitor and its
history remain); re-enabling resumes and seeds a fresh probe from every
region. Requires an owner/admin session or an API key.
Authorizations
Section titled “ Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “ Path Parameters ”The site’s UUID.
The uptime monitor’s UUID.
Request Bodyrequired
Section titled “ Request Bodyrequired ”Mutable monitor fields. url is required on create; on update every
field is optional and omitted fields keep their current value.
object
The http(s) URL to probe.
A display name; null shows the URL.
How often each region probes the URL.
Probe request timeout; a slower probe counts as failed.
false pauses probing without deleting the monitor or its history.
Extra alert addresses for this monitor, on top of the notification settings.
Extra alert webhooks for this monitor.
A notification webhook. slack, discord, and teams format the
message for the respective chat app; http POSTs a structured JSON
payload to any endpoint.
object
Example
{ "cadenceSeconds": 300, "enabled": true}Responses
Section titled “ Responses ”The updated monitor.
object
A stored uptime monitor. status/status_since double as current status.
object
JSON-encoded array of extra alert addresses.
JSON-encoded array of extra alert webhooks.
Consensus status written by the coordinator; unknown before the first probes.
Epoch ms the current status began, or null.
Epoch ms of the last probe, or null.
Example
{ "monitor": { "enabled": 0, "status": "up" }}A field failed validation.
object
A human-readable error message.
Examplegenerated
{ "error": "example"}Missing or invalid credentials.
object
A human-readable error message.
Example
{ "error": "invalid api key"}The caller’s role or key scope does not allow this action.
object
A human-readable error message.
Example
{ "error": "only owners and admins can edit site settings"}The site or monitor was not found.
object
A human-readable error message.
Example
{ "error": "monitor not found"}