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

name string required

Monitor display name.

type string required

Check type: http, ping, tcp, dns, keyword, heartbeat.

url string

URL to monitor. Required for http, ping, tcp, and keyword types.

method string default: GET

HTTP method.

interval_seconds integer default: 60

Check interval in seconds.

timeout_ms integer default: 30000

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 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
  }'

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" } }
Ask a question... ⌘I