Create monitor
Create a new HTTP, TCP, DNS, ping, keyword, or heartbeat monitor.
Create monitor
POST /monitors
Create a new monitor.
Auth: Bearer token (write scope)
Body parameters
Monitor display name.
Check type: http, ping, tcp, dns, keyword, heartbeat.
URL to monitor. Required for http, ping, tcp, and keyword types.
HTTP method.
Check interval in seconds.
Timeout in milliseconds.
Regions to run checks from: us-east, us-west, eu-west, eu-central, ap-southeast, ap-northeast.
Tags for filtering and organization.
Custom request headers.
Request body (for POST / PUT methods).
Response assertions (status_code, body_contains, etc.).
Auth type: basic, bearer, or header.
Auth credentials, shape depends on auth_type.
Request
bashcurl -X POST https://happyuptime.com/api/v1/monitors \ -H "Authorization: Bearer hu_your_api_key" \ -H "Content-Type: application/json" \ -d '{ "name": "My App", "url": "https://myapp.com", "type": "http", "interval_seconds": 60 }'
bashhappy monitors create \ --name "My App" \ --url https://myapp.com \ --interval 60
javascriptconst res = await fetch("https://happyuptime.com/api/v1/monitors", { method: "POST", headers: { "Authorization": "Bearer " + process.env.HAPPYUPTIME_API_KEY, "Content-Type": "application/json", }, body: JSON.stringify({ name: "My App", url: "https://myapp.com", type: "http", interval_seconds: 60, }),});
Response
json{ "data": { "id": "mon_new456", "project_id": "proj_xyz", "name": "My API", "type": "http", "url": "https://api.example.com/health", "method": "GET", "status": "unknown", "interval_seconds": 30, "timeout_ms": 30000, "regions": ["us-east", "eu-west"], "tags": [], "paused": false, "created_at": "2026-03-07T15:00:00Z", "updated_at": "2026-03-07T15:00:00Z" }}