Skip to content

Monitors

Monitors are the unit of uptime tracking. Each monitor runs a check (HTTP, TCP, DNS, ping, heartbeat, or custom) on a schedule and emits a state series you can alert on.

MethodPathDescriptionScope
GET/api/v1/monitorsList monitors.monitors
POST/api/v1/monitorsCreate a monitor.monitors
GET/api/v1/monitors/{id}Read a monitor.monitors
PATCH/api/v1/monitors/{id}Update a monitor.monitors
DELETE/api/v1/monitors/{id}Delete a monitor.monitors
POST/api/v1/monitors/{id}/pausePause scheduling.monitors
POST/api/v1/monitors/{id}/resumeResume scheduling.monitors
POST/api/v1/monitors/{id}/muteMute alerts without pausing checks.monitors
POST/api/v1/monitors/{id}/unmuteUnmute.monitors
GET/api/v1/monitors/{id}/checksList recent check results.monitors
GET/api/v1/monitors/{id}/uptimeUptime percentage over a window.monitors
GET/api/v1/monitors/{id}/latencyLatency histogram over a window.monitors
PUT/api/v1/monitors/{id}/labelsReplace label set.monitors
DELETE/api/v1/monitors/{id}/labels/{key}Remove one label.monitors
GET/api/v1/monitors/check-statsAggregate check counters across the org.monitors
POST/api/v1/heartbeat/{monitorID}?token={heartbeat_token}Heartbeat ping (no body). See below.None (the token authenticates)

The heartbeat endpoint does not take an API key. It authenticates with the monitor’s heartbeat_token, sent as the token query parameter. The token is generated when you create a heartbeat monitor and is returned in the heartbeat_token field when you read the monitor. The monitor detail page shows the full ping URL with a copy button.

Terminal window
curl -fsS --retry 3 -X POST \
"https://console.yipyap.run/api/v1/heartbeat/<monitor-id>?token=<heartbeat-token>"

A missing or wrong token returns 401 with invalid heartbeat token. The token is a secret: anyone who has it can mark the monitor healthy. It cannot be rotated today; if it leaks, create a new heartbeat monitor and delete the old one. The endpoint allows 60 requests per minute per source IP. See Heartbeat Checks.

POST /api/v1/monitors

{
"name": "Public API",
"type": "http",
"target": "https://api.example.com/health",
"interval_seconds": 30,
"timeout_seconds": 5,
"regions": ["us-east-1", "eu-west-1"],
"http": {
"method": "GET",
"expected_status": [200, 204],
"follow_redirects": true,
"headers": { "User-Agent": "YipYap" }
},
"labels": { "env": "prod", "team": "platform" }
}
FieldRequiredNotes
nameyes1-120 chars.
typeyeshttp, tcp, dns, ping, heartbeat.
targetyesURL, host:port, or hostname depending on type.
interval_secondsnoDefault per-type (HTTP=60, heartbeat=none). Min per plan tier.
timeout_secondsnoDefault 10, max 60.
regionsnoPlan-gated; Free tier runs from a single region.
http.*, tcp.*, dns.*, ping.*noType-specific options. See the per-type monitor docs.
labelsnoFree-form string→string. Used by monitor groups and routing filters.

Response: 201 Created with the full monitor document, including the generated id and, for heartbeat monitors, the heartbeat_token used in the ping URL.

GET /api/v1/monitors/{id} returns the same shape as the create response plus:

{
"current_state": "up",
"current_state_since": "2026-04-24T10:00:00Z",
"last_check_at": "2026-04-24T17:40:00Z"
}

PATCH /api/v1/monitors/{id} with a partial body. Changing type is not supported; delete and recreate.

GET /api/v1/monitors

Returns a bare array of monitors, sorted by name. Each item is the monitor document plus its latest status (up, down, degraded, or unknown before the first check), latency_ms, endpoint, uptime_pct and recent_checks (up to the last 20).

Query parameters:

ParameterDescription
typeOnly monitors of this type, for example http.
enabledtrue for enabled monitors, false for paused ones.
limit, offsetPaging; see Conventions.

GET /api/v1/monitors/{id}/checks?since=2026-04-24T00:00:00Z&until=2026-04-24T23:59:59Z&limit=100

ParameterDescription
since, untilRFC 3339 bounds on checked_at. Without since, the range starts at the plan’s retention window.
statusup, down or degraded. Any other value returns 400.
limit, offsetPaging; see Conventions.

Newest checks come first. The response wraps the page with the total that match:

{
"checks": [
{
"id": "9c2e4f1a-6b3d-4e8f-a0c7-1d5b2e9f3a64",
"monitor_id": "6f1c2a9e-0b7d-4c1e-9a53-2f8e1d4b7c60",
"status": "down",
"latency_ms": 5003,
"status_code": 503,
"error": "unexpected status code 503",
"checked_at": "2026-04-24T17:42:03Z"
}
],
"total": 2880
}

GET /api/v1/monitors/{id}/uptime returns uptime slots for the console’s uptime bars, keyed by window:

{
"24h": [ { "ok": true, "status": "up", "uptime_pct": 100 } ],
"7d": [ { "ok": false, "status": "degraded", "uptime_pct": 98.6 } ],
"30d": [ { "ok": true, "status": "up", "uptime_pct": 99.9 } ],
"90d": [ { "ok": true, "status": "up", "uptime_pct": 99.9 } ]
}

24h holds up to 24 hourly slots. 7d, 30d and 90d hold up to 7, 30 and 90 daily slots. A slot is up at 99% or more, degraded from 90% and down below 90%. Before hourly and daily rollups exist, only 24h is returned, with one slot for each of the last 200 checks, newest first.

GET /api/v1/monitors/{id}/latency returns a bare array of hourly points, oldest first:

[
{
"time": "2026-04-24T17:00:00Z",
"latency_ms": 182.4,
"p95_ms": 240.1,
"p99_ms": 410.7
}
]

Before rollups exist, the points are the last 100 checks, newest first, and p95_ms and p99_ms are 0.