Оповещения и уведомления
Webhook alerts: JSON payload reference
Receive FastPing alerts on your own HTTPS endpoint: the JSON payload, its fields, delivery rules, how to secure the endpoint and a receiver example.
For every alert, FastPing sends an HTTP POST with Content-Type: application/json and the User-Agent FastPing-Monitor/1.0 (+https://fastping.app). The body looks like this:
{
"event": "down",
"monitor": { "id": 12, "name": "Shop", "type": "http", "target": "https://shop.example.com" },
"detail": "HTTP 503",
"status": "down",
"timestamp": "2026-10-17T09:30:00.000Z",
"url": "https://fastping.app/app/monitors/12"
}| Field | Description |
|---|---|
event | down, up (recovery or warning cleared), warn or event (a change, such as DNS records or a game server's map) |
monitor.id | Numeric monitor ID, the same as in the dashboard URL and the REST API |
monitor.name | The monitor's friendly name |
monitor.type | Monitor type key, such as http, ssl or game |
monitor.target | The URL or host; an empty string for heartbeat monitors |
detail | The message of the check, for example HTTP 503 or Certificate expires in 9 days |
status | The monitor's status after this alert: up, down or warn |
timestamp | When the alert was sent, ISO 8601 in UTC |
url | Link to the monitor in the dashboard (login required) |
The test alert has "event": "event", monitor ID 0 and the name FastPing test, so your code can recognise and ignore it.
- The URL must use HTTPS and resolve to a public IP address.
- Your endpoint must answer with a 2xx status within 10 seconds. Redirects are not followed and count as failures.
- Each alert is sent once. There are no retries, so answer immediately and do slow work afterwards.
Requests are not signed. Put a long random secret in the URL path, such as https:/, accept requests only on that exact path and keep the URL private. Treat the content as untrusted input: monitor names and details are text your team typed or that monitored servers returned.
// receiver.mjs: node receiver.mjs (Node.js 18+, no dependencies)
import http from 'node:http';
const SECRET_PATH = '/fastping/8f3c2a1e9b7d4c6a'; // long random path segment, keep it private
http.createServer((req, res) => {
if (req.method !== 'POST' || req.url !== SECRET_PATH) { res.writeHead(404).end(); return; }
let body = '';
req.on('data', (chunk) => { body += chunk; if (body.length > 65536) req.destroy(); });
req.on('end', () => {
res.writeHead(204).end(); // answer first: FastPing waits at most 10 seconds
try {
const alert = JSON.parse(body);
console.log(alert.event, alert.monitor.name, alert.detail);
// ...open a ticket, page someone, restart a service...
} catch { /* not JSON: ignore */ }
});
}).listen(8080);