Register an uptime monitor
const url = 'https://api.overwatch.weareheavy.dev/v1/sites/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/uptime/monitors';const options = { method: 'POST', headers: {'x-api-key': '<x-api-key>', 'Content-Type': 'application/json'}, body: '{"url":"https://example.com/health","name":"API health","cadenceSeconds":60,"alertEmails":["oncall@example.com"],"alertWebhooks":[{"kind":"slack","url":"https://hooks.slack.com/services/T000/B000/XXXX"}]}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.overwatch.weareheavy.dev/v1/sites/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/uptime/monitors \ --header 'Content-Type: application/json' \ --header 'x-api-key: <x-api-key>' \ --data '{ "url": "https://example.com/health", "name": "API health", "cadenceSeconds": 60, "alertEmails": [ "oncall@example.com" ], "alertWebhooks": [ { "kind": "slack", "url": "https://hooks.slack.com/services/T000/B000/XXXX" } ] }'Register a monitor: the URL is probed from four regions (North America, Europe, Asia, Oceania) on the chosen cadence, and a first probe from every region fires immediately. Requires an owner/admin session or an API key; the Uptime app must be enabled for the site.
Monitors count against an allowance (2 included per site); past it,
creation requires overage billing and fails with 403 otherwise.
Authorizations
Section titled “ Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “ Path Parameters ”The site’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
{ "url": "https://example.com/health", "name": "API health", "cadenceSeconds": 60, "alertEmails": [ "oncall@example.com" ], "alertWebhooks": [ { "kind": "slack", "url": "https://hooks.slack.com/services/T000/B000/XXXX" } ]}Responses
Section titled “ Responses ”The new monitor. Probing starts immediately when enabled.
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" }}url is missing or a field failed validation.
object
A human-readable error message.
Example
{ "error": "cadenceSeconds must be one of 60, 300, 900, 1800, 3600"}Missing or invalid credentials.
object
A human-readable error message.
Example
{ "error": "invalid api key"}The caller may not manage monitors, or the included monitors are in use and overage billing is off.
object
A human-readable error message.
Example
{ "error": "this site's 2 included monitors are in use — enable overage billing on the Billing page to add more"}No site with that id is visible to the caller.
object
A human-readable error message.
Example
{ "error": "site not found"}The Uptime app is not enabled for this site.
object
A human-readable error message.
Example
{ "error": "uptime is not enabled for this site"}