Uptime Monitors API
Create uptime monitors that check a URL every 5–1440 minutes and alert you by e-mail or webhook when it goes down and when it is back up.
Monitors watch your websites and APIs from our servers. POST /v1/monitors with a url creates one: it is checked at once, then every interval_minutes, with GET or HEAD, an expect_status list (default 200-399, e.g. 200,301), an optional keyword that must appear in the body and a timeout_ms. A monitor turns down after 2 consecutive failed checks (after a first failure the URL is re-checked at the next 5-minute run) and up again on the first success; only these changes create an event and send alerts.
Alerts go to the verified e-mail address of your account (alert_email, on by default; “down” e-mails are spaced at least 30 minutes apart per monitor and capped per day) and / or to your webhook_url, which receives a JSON POST: {"event": "monitor.down" | "monitor.up", "monitor": {id, name, url}, "status_code", "response_ms", "error", "at", "down_since"}. GET /v1/monitors lists your monitors with status, last check and uptime; /v1/monitors/{id} shows one with its recent events, PATCH (or POST) updates it (paused=true pauses it), DELETE removes it, /{id}/events returns the history and POST /{id}/check runs a manual test without changing the statistics.
Monitors belong to an account: call with your API key or while signed in, or manage them from the dashboard. The plan sets the number of monitors and the shortest interval (Free: 3 monitors, every 15 minutes; Starter: 20 and Pro: 100, every 5 minutes). Creating, updating and testing count one request like every other API; GET reads are free.
Parameters
| Name | In | Type | Required | Default | |
|---|---|---|---|---|---|
url | body | string | yes | URL to monitor (required when creating). | |
name | body | string | no | Display name (max 100 characters). | |
method | body | string | no | GET | GET or HEAD. |
expect_status | body | string | no | 200-399 | Accepted status codes or ranges, e.g. 200,301 (up to 10). |
keyword | body | string | no | Text that must appear in the body (GET only, max 200 characters). | |
interval_minutes | body | number | no | Check interval: from your plan’s minimum (15 Free, 5 Starter / Pro) to 1440. Default: the plan minimum, at least 5. | |
timeout_ms | body | number | no | 10000 | Timeout per check (1000–15000 ms). |
alert_email | body | boolean | no | true | E-mail the verified account address on down / up. |
webhook_url | body | string | no | URL receiving a JSON POST (monitor.down / monitor.up); empty to remove. | |
paused | body | boolean | no | false | Pause or resume checks. |
id | path | string | no | /v1/monitors/{id} (GET, PATCH, POST, DELETE), /{id}/events (history), /{id}/check (POST: manual test). | |
limit | query | number | no | 50 | /{id}/events: number of events (1–200). |
Example
curl -X POST "https://apibox.io.vn/v1/monitors" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"url":"https://example.com/","name":"Trang chủ","interval_minutes":5,"webhook_url":"https://example.com/hooks/uptime"}'const res = await fetch('https://apibox.io.vn/v1/monitors', {
method: 'POST',
headers: {
Authorization: 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json',
},
body: JSON.stringify({
"url": "https://example.com/",
"name": "Trang chủ",
"interval_minutes": 5,
"webhook_url": "https://example.com/hooks/uptime"
}),
});
const data = await res.json();
console.log(data);import requests
res = requests.post(
"https://apibox.io.vn/v1/monitors",
headers={"Authorization": "Bearer YOUR_API_KEY"},
json={"url": "https://example.com/", "name": "Trang chủ", "interval_minutes": 5, "webhook_url": "https://example.com/hooks/uptime"},
timeout=30,
)
print(res.json())<?php
$ch = curl_init('https://apibox.io.vn/v1/monitors');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_HTTPHEADER => ['Authorization: Bearer YOUR_API_KEY', 'Content-Type: application/json'],
CURLOPT_POSTFIELDS => '{"url":"https://example.com/","name":"Trang chủ","interval_minutes":5,"webhook_url":"https://example.com/hooks/uptime"}',
]);
$response = curl_exec($ch);
print_r(json_decode($response, true));Response
{
"id": "mon_k3x9q2v7b1m8d4f0a6zc",
"name": "Trang chủ",
"url": "https://example.com/",
"method": "GET",
"expect_status": "200-399",
"keyword": null,
"interval_minutes": 5,
"timeout_ms": 10000,
"alert_email": true,
"webhook_url": "https://example.com/hooks/uptime",
"paused": false,
"status": "up",
"last_check": {
"at": "2026-11-11T03:20:00.000Z",
"status_code": 200,
"response_ms": 184,
"error": null
},
"uptime_percent": 100,
"checks": {
"total": 1,
"failed": 0
},
"status_since": "2026-11-11T03:20:00.000Z",
"next_check_at": "2026-11-11T03:25:00.000Z",
"created_at": "2026-11-11T03:20:00.000Z",
"first_check": {
"ok": true,
"status_code": 200,
"response_ms": 184,
"error": null
}
}
Use cases
- Get an e-mail when your website or shop goes down
- Post incidents to Slack, Telegram or your own system via webhook
- Watch a health-check endpoint for a keyword such as "ok"
- Track uptime percentages of partner APIs
FAQ
Why was I not alerted after one failure?
A monitor turns down after 2 consecutive failures to avoid false alarms; the URL is re-checked at the next 5-minute run.
Which e-mail receives alerts?
The verified e-mail address of your account. Verify it in the dashboard; alerts are spaced and capped per day.
Do monitor checks use my quota?
The scheduled checks do not. Creating, updating and manual tests count one request each; GET reads are free.
Related APIs
Webhook Tester
Create a unique URL that captures every HTTP request sent to it – method, headers, query and body – then inspect them in the browser or via API.
👤Vietnamese Fake Data
Realistic Vietnamese test data: names, addresses on the 2025 map, mobile numbers by network, CCCD and tax codes with a valid structure, companies, bank accounts.
{?}JSON Schema Mock Data
Generate realistic sample JSON from a JSON Schema (types, formats, enums, patterns, ranges, $ref, oneOf / allOf), validated against the schema.