API reference

Create a monitor

Create an HTTP monitor or a cron job heartbeat with the Uptenna API. Same validation and plan limits as the dashboard; the first check runs within a minute.

POST https://uptenna.com/v1/monitors

Add an HTTP monitor or a heartbeat. The same validation and plan limits apply as in the dashboard; the first check runs within a minute.

For a heartbeat, send kind: "heartbeat", a name and period_s; the response's heartbeat_url is the URL your job pings:

heartbeat.json
{
  "kind": "heartbeat",
  "name": "Nightly backup",
  "period_s": 86400
}

Request body

JSON. Fields not sent take their defaults.

NameTypeRequiredDescription
kindstringnoDefault http. One of http, heartbeat.
namestringnoUp to 80 characters. Required for heartbeats; HTTP monitors default to the URL's hostname.
urlstringnoHTTP: required. A public http:// or https:// URL; private and internal addresses are refused.
methodstringnoHTTP. Default GET. One of GET, HEAD, POST.
expect_statusstringnoHTTP. Codes or ranges, comma separated. Default 200-399.
keywordstring or nullnoHTTP. Text the body must contain (needs GET or POST).
keyword_absentstring or nullnoHTTP. Text the body must not contain.
timeout_msintegernoHTTP. 1000 to 30000. Default 10000.
interval_sintegernoHTTP. Default 60. Must be allowed by your plan. One of 30, 60, 180, 300, 600.
ssl_checkbooleannoHTTP. Default true.
period_sintegernoHeartbeat: required. How often the job runs, 60 to 2678400 seconds.
grace_sintegernoHeartbeat. 0 to 604800 seconds. Default 20% of the period, between 1 minute and 1 hour.

Example request

curl
curl -X POST "https://uptenna.com/v1/monitors" \
  -H "Authorization: Bearer $UPTENNA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name":"API","url":"https://api.example.com/health","interval_s":60}'
Node.js (fetch)
const res = await fetch("https://uptenna.com/v1/monitors", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.UPTENNA_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({"name":"API","url":"https://api.example.com/health","interval_s":60}),
});
if (!res.ok) throw new Error((await res.json()).error.message);
const monitor = await res.json();

Response

Returns 201 Created with the monitor object.

201 Created
{
  "id": "mon_Xk3v9QmT2bLp",
  "kind": "http",
  "name": "API",
  "status": "pending",
  "paused": false,
  "over_limit": false,
  "url": "https://api.example.com/health",
  "method": "GET",
  "expect_status": "200-399",
  "keyword": null,
  "keyword_absent": null,
  "timeout_ms": 10000,
  "interval_s": 60,
  "effective_interval_s": 60,
  "ssl_check": true,
  "heartbeat_url": null,
  "period_s": null,
  "grace_s": null,
  "last_ping_at": null,
  "last_checked_at": null,
  "last_latency_ms": null,
  "last_status_code": null,
  "last_reason": null,
  "reason_text": null,
  "cert_expires_at": null,
  "cert_issuer": null,
  "open_incident_id": null,
  "uptime_24h": null,
  "uptime_30d": null,
  "created_at": "2026-12-01T09:40:12.000Z",
  "updated_at": "2026-12-01T09:40:12.000Z"
}

Errors

Errors look like { "error": { "code", "message" } } (see Errors).

StatusCodeWhen
400invalid_monitorA field is missing or invalid; the message says which.
402monitor_limitYour plan's monitor limit is reached. Upgrade, or delete a monitor first.
402interval_not_in_planinterval_s is faster than your plan allows (Free: 5 minutes, Pro: 1 minute, Team: 30 seconds).
401unauthorizedThe Authorization header is missing, malformed, or the key is unknown or revoked.
429rate_limitedMore than 120 requests in 60 seconds with this key. Wait for the Retry-After header's seconds.