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 string
URL to monitor. Required for http, ping, tcp, and keyword types.
HTTP method.
Check interval in seconds.
Timeout in milliseconds.
regions string[]
Regions to run checks from: us-east, us-west, eu-west, eu-central, ap-southeast, ap-northeast.
tags string[]
Tags for filtering and organization.
headers object
Custom request headers.
body string
Request body (for POST / PUT methods).
assertions object
Response assertions (status_code, body_contains, etc.).
auth_type string
Auth type: basic, bearer, or header.
auth_config object
Auth credentials, shape depends on auth_type.
Request
curl -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
}'happy monitors create \
--name "My App" \
--url https://myapp.com \
--interval 60const 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" } }