Create a monitor
Creates a monitor and its public component. type selects the kind: http (default, polls a URL), heartbeat (a scheduled job pings us; the response includes a pingUrl to wire into the job), or tcp (connects to a host:port). The first check runs on the next poll cycle (within ~2 minutes).
Authorizations
An org API token (sv_…), sent as Authorization: Bearer <token>.
Headers
Opt-in safe retries. Send a unique value (a UUID); a retry with the same key replays the first response (header Idempotent-Replayed: true) instead of acting twice. Reusing a key with a different body is rejected (400); a retry while the first is in flight gets 409. Scoped to the workspace, expires after 24h.
255Body
- Option 1
- Option 2
- Option 3
Discriminated on type. Omit type for an HTTP monitor (backward-compatible).
1 - 120The URL to poll. http/https only; SSRF-validated.
http GET, HEAD, POST Poll cadence (60s floor).
60 <= x <= 864001000 <= x <= 600001 <= x <= 101 <= x <= 10Healthy status codes. Empty/absent = any 2xx–3xx.
100 <= x <= 599200200Assert on a JSON response: navigate path (dot/bracket, leading $. optional) and compare with op.
A passing check slower than this is reported degraded (still up).
1 <= x <= 60000A check slower than this FAILS (opens an incident after the flap threshold).
1 <= x <= 60000Custom request headers (e.g. Authorization). Stored encrypted; sent only to the original host (dropped on a cross-host redirect).
Request body for a POST/PUT check. Stored encrypted (may carry secrets).
32768Content-Type for body (default application/json).
20060Response
The created monitor.