API getting started
Onboarding for the UptimeWarden Public API v1, token creation, base URL, auth header, response envelope, error codes, and the time-bounded data window.
This page is the onboarding entry point for any developer integrating with UptimeWarden. In five steps you create a token, make your first call, create a monitor and read its results; by the end you know how to authenticate and recognise the response and error shapes used by every v1 endpoint. For the full reference, open API endpoints.
What the Public API gives you
The Public API lives under /api/v1/ and covers monitor management (create, read, update and delete with every setting the dashboard has), the reference lists a monitor points at (escalation policies, webhooks, regions), incident triage, SSL inspection, reading the latest security analysis, deploy markers, an overall status summary, and AI Health Predictions. Monitors, incidents and references are named by their publicId (a ULID); no v1 endpoint takes or returns internal numeric ids. The canonical schema is published at /api/docs/v1-openapi.json (OpenAPI 3.0).
| Capability | Endpoint family |
|---|---|
| Monitor CRUD + results + stats | /api/v1/monitors/* |
| Incident read / update / comment | /api/v1/incidents/* |
| SSL status (overview + per-monitor) | /api/v1/ssl/* |
| Security analysis (latest result) | /api/v1/security/* |
| AI Health Predictions | /api/v1/health/* |
| Deploy markers | /api/v1/deploys/* |
| Overall status summary | /api/v1/status/overall |
Step 1. Create a token
- Sign in to the dashboard.
- In the left menu open More › Developers › API & Tokens, then the API tokens tab.
- Click Create API token, give it a name, choose a permission preset and an expiry (30, 90 or 365 days, or never; the default is 90 days), click Create token, and copy the token. It is shown once.
Tokens are prefixed uptw_ so you can spot one in logs without leaking the secret. See API tokens for the full permission catalogue and rotation guidance.
export API_TOKEN=uptw_xxxxxxxxxxxxxxxxxxxxxxxx
Permission presets
These are one-click chips in the token-creation dialog:
| Preset | Permissions |
|---|---|
| Monitor Viewer | monitors:read, monitors:results:read, ssl:status:read |
| Monitor Manager | + monitors:create, monitors:delete |
| Incident Manager | incidents:read, incidents:update, incidents:comment |
| Security Analyst | security:analysis:read, security:analysis:monitor, security:analysis:website, ssl:status:read |
| Health Monitor | monitors:read, health:predictions:read |
| Deploy Manager | monitors:read, deploys:read, deploys:write, monitors:maintenance:read, monitors:maintenance:write |
| Alert Source Manager | alert_sources:read, alert_sources:write (only where alert sources are turned on) |
| Full Access | Every permission above except admin (use with caution, defeats the granularity model). The admin permission cannot be granted from the dashboard. |
Step 2. Make your first call
Every request needs the Authorization: Bearer <token> header. The base URL is https://app.uptimewarden.online.
curl -sS "https://app.uptimewarden.online/api/v1/monitors?limit=1" \
-H "Authorization: Bearer $API_TOKEN"
200 OK means the token is valid and carries monitors:read. A successful list response is wrapped in this envelope:
{
"success": true,
"data": [ /* array of monitors */ ],
"pagination": {
"page": 1,
"limit": 1,
"total": 42,
"totalPages": 42,
"hasNextPage": true,
"hasPrevPage": false
}
}
Detail and single-resource calls return { success, data }. DELETE calls also add a message field.
Step 3. Create a monitor
curl -sS -X POST "https://app.uptimewarden.online/api/v1/monitors" \
-H "Authorization: Bearer $API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "Production API",
"url": "https://api.example.com/health",
"type": "http",
"interval": 300,
"timeout": 30
}'
Permission required: monitors:create. type accepts http, tcp, udp, ssl, websocket, mcp, grpc, ping, dns, heartbeat, and the body takes every monitor field listed in API endpoints. The response's data.publicId (a 26-character ULID) is the monitor's id; keep it as $ID for the next calls. Change a monitor later with PATCH /api/v1/monitors/$ID. Paths take only this ULID; a numeric id is refused with 400.
Step 4. Read results (last 7 days max)
curl -sS "https://app.uptimewarden.online/api/v1/monitors/$ID/results?timeRange=7d&limit=100" \
-H "Authorization: Bearer $API_TOKEN"
Check results reach at most 7 days back and default to the last 24 hours when you send no window. Use the dashboard for longer windows. The Historical-data window section below lists every way to choose the window.
Step 5. Stats
curl -sS "https://app.uptimewarden.online/api/v1/monitors/$ID/stats?timeRange=7d" \
-H "Authorization: Bearer $API_TOKEN"
Returns { uptime, avgResponseTime, totalChecks, latestResult }. Stats default to the last 7 days.
Rate limits and quotas
Rate limits are per token, per minute, with the cap depending on the endpoint:
| Endpoint family | Cap |
|---|---|
Reads: GET on monitors, results, stats, incidents and the other GET endpoints | 120 req/min |
Writes: POST, PATCH and DELETE | 60 req/min |
SSL: GET /api/v1/ssl/* | 60 req/min |
AI Health Predictions: GET /api/v1/health/monitors/:id/predictions | 60 req/min |
Security analysis read: GET /api/v1/security/monitors/:id/analysis | 30 req/min |
Analyze: POST /api/v1/security/monitors/:id/analyze and POST /api/v1/security/analyze (both answer 501 for now) | 10 req/min |
MCP: POST /api/mcp (each message) | 120 req/min |
Each MCP tool call also counts in its own tier, the one of the REST endpoint it uses, on top of the 120 messages. A tool that writes draws from the 60 writes per minute.
Requests whose token does not verify are limited per IP address: after 30 failed authentications from one address in a minute, that address is locked out for tokens that do not verify until the minute is over. Valid tokens keep working from that address.
Every response that passed the limit carries the cap that applied:
X-RateLimit-Limit: 120
Exceeding the cap returns 429 Too Many Requests with a Retry-After header and a retryAfter field (seconds).
Response envelope
Every v1 endpoint returns either:
{ "success": true, "data": ... }
or:
{
"success": false,
"error": {
"code": "TIME_RANGE_EXCEEDED",
"message": "Time range exceeds maximum allowed",
"details": ["Requested: 10 days", "Maximum allowed: 7 days"]
}
}
details is an optional array of clarifying strings. Authentication errors (401) may return the simpler { error, message } shape, clients should treat the HTTP status as authoritative.
Error codes
| HTTP | error.code | When it happens |
|---|---|---|
400 | VALIDATION_ERROR | Required body field missing or wrong type. |
400 | INVALID_URL | URL parameter is not a valid URI. |
400 | INVALID_MONITOR_ID | The monitor id in the path is not a valid publicId (a numeric id is refused). |
400 | INVALID_TIME_RANGE | A timeRange, days, since, startDate or endDate value cannot be read. |
401 | - | Missing or malformed Authorization header, or the token is invalid, expired, turned off, or its owner's account is deactivated or deleted. |
403 | FORBIDDEN | Token lacks the required permission. details lists the required permission and the token's permissions. |
403 | ACCESS_DENIED | A team shares the monitor with you but you cannot edit it (PATCH, DELETE). |
403 | TIME_RANGE_EXCEEDED | Asking for older data than the supported range (7 days for results and stats, 30 days for incidents). |
403 | PLAN_LIMIT_REACHED | A plan limit was reached on a POST /monitors (for example the monitor count). details carries the reason. |
404 | NOT_FOUND, MONITOR_NOT_FOUND | Resource missing or not visible to this token. A monitor you neither own nor have through a team answers like one that does not exist (MONITOR_NOT_FOUND), on the monitor and its results, stats, SSL, security and health routes. |
429 | - | Per-minute rate-limit cap exceeded. Look at Retry-After / retryAfter. |
501 | - | The analyze endpoints. Security analysis runs on a schedule; read it with GET /api/v1/security/monitors/:id/analysis. |
500 | INTERNAL_ERROR | Server-side fault. |
Historical-data window
The supported history ranges for API tokens are:
monitors:results:read: at most 7 days of check results and stats. Results default to the last 24 hours, stats to the last 7 days.incidents:read: at most 30 days of incident history, 7 days by default. Incidents that are still open are always listed, whatever their age.
Choose the window with one of these:
| Parameter | Meaning |
|---|---|
days=N | The last N days. |
timeRange | 24h, 7d, 30d, or any number of hours or days written Nh / Nd. |
since | An RFC 3339 timestamp (for example 2026-11-27T00:00:00Z); from then until now. |
startDate, optionally with endDate | RFC 3339 timestamps. endDate is exclusive. |
A window that reaches further back than the range above returns 403 TIME_RANGE_EXCEEDED. A value that cannot be read returns 400 INVALID_TIME_RANGE. For longer windows, use the dashboard.
Versioning policy
v1 is stable. Breaking changes ship as v2; additive changes (new optional fields, new endpoints) land in v1 without a version bump. The OpenAPI document at /api/docs/v1-openapi.json is the source of truth, this docs site is derived from it.
Next steps
- Browse every endpoint in API endpoints.
- Manage tokens at scale in API tokens.
- Get the machine-readable schema at
/api/docs/v1-openapi.json.