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.
Endpoints
Section titled “Endpoints”| Method | Path | Description | Scope |
|---|---|---|---|
GET | /api/v1/monitors | List monitors. | monitors |
POST | /api/v1/monitors | Create 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}/pause | Pause scheduling. | monitors |
POST | /api/v1/monitors/{id}/resume | Resume scheduling. | monitors |
POST | /api/v1/monitors/{id}/mute | Mute alerts without pausing checks. | monitors |
POST | /api/v1/monitors/{id}/unmute | Unmute. | monitors |
GET | /api/v1/monitors/{id}/checks | List recent check results. | monitors |
GET | /api/v1/monitors/{id}/uptime | Uptime percentage over a window. | monitors |
GET | /api/v1/monitors/{id}/latency | Latency histogram over a window. | monitors |
PUT | /api/v1/monitors/{id}/labels | Replace label set. | monitors |
DELETE | /api/v1/monitors/{id}/labels/{key} | Remove one label. | monitors |
GET | /api/v1/monitors/check-stats | Aggregate check counters across the org. | monitors |
POST | /api/v1/heartbeat/{monitorID}?token={heartbeat_token} | Heartbeat ping (no body). See below. | None (the token authenticates) |
Heartbeat pings
Section titled “Heartbeat pings”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.
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.
Create a monitor
Section titled “Create a monitor”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" }}| Field | Required | Notes |
|---|---|---|
name | yes | 1-120 chars. |
type | yes | http, tcp, dns, ping, heartbeat. |
target | yes | URL, host:port, or hostname depending on type. |
interval_seconds | no | Default per-type (HTTP=60, heartbeat=none). Min per plan tier. |
timeout_seconds | no | Default 10, max 60. |
regions | no | Plan-gated; Free tier runs from a single region. |
http.*, tcp.*, dns.*, ping.* | no | Type-specific options. See the per-type monitor docs. |
labels | no | Free-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.
Read a monitor
Section titled “Read a monitor”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"}Update a monitor
Section titled “Update a monitor”PATCH /api/v1/monitors/{id} with a partial body. Changing type is not supported; delete and recreate.
List monitors
Section titled “List monitors”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:
| Parameter | Description |
|---|---|
type | Only monitors of this type, for example http. |
enabled | true for enabled monitors, false for paused ones. |
limit, offset | Paging; see Conventions. |
Check history
Section titled “Check history”GET /api/v1/monitors/{id}/checks?since=2026-04-24T00:00:00Z&until=2026-04-24T23:59:59Z&limit=100
| Parameter | Description |
|---|---|
since, until | RFC 3339 bounds on checked_at. Without since, the range starts at the plan’s retention window. |
status | up, down or degraded. Any other value returns 400. |
limit, offset | Paging; 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}Uptime & latency
Section titled “Uptime & latency”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.
Related resources
Section titled “Related resources”- Monitor Groups: logical grouping + cascade rules.
- Custom States: bring-your-own state semantics.
- Events API: trigger alerts from external systems.
- Heartbeat Checks: dead-man’s-switch monitors.