Docs & API
Automate Halvyn: manage monitors, read incidents and send heartbeats.
Last updated: 22 October 2026
1. Getting started
Everything in the dashboard runs on the same REST API. The base URL is https://halvyn.win, and all requests and responses are JSON.
- Create an account and add your first monitor in the app.
- Create an API token for scripts and CI (see below).
- For cron jobs and other scheduled work, use a heartbeat monitor and ping its URL.
2. Authentication
An organisation owner or admin can create API tokens under Organization → API tokens. A token starts with pw_ and is shown once, when it is created. Send it as a bearer token:
curl https://halvyn.win/api/monitors \ -H "Authorization: Bearer pw_your_token"
- A token has the member or admin role, never owner.
- Every token expires: 90 days by default, one year at most.
- A revoked token stops working immediately.
3. Monitors
GET /api/monitors: list your monitorsGET /api/monitors/:id: get one monitorPOST /api/monitors: create a monitorPATCH /api/monitors/:id: update a monitor (name, enabled, interval, thresholds, regions, config)DELETE /api/monitors/:id: delete a monitorPOST /api/monitors/:id/check-now: run a check nowGET /api/monitors/:id/results,/uptime,/stats: get check history and uptime
Creating an HTTP monitor:
curl -X POST https://halvyn.win/api/monitors \
-H "Authorization: Bearer pw_your_token" \
-H "Content-Type: application/json" \
-d '{
"name": "Homepage",
"project": "Website",
"type": "http",
"intervalSeconds": 60,
"regions": ["us-east"],
"config": { "url": "https://example.com", "expectedStatus": [200] }
}'Common fields:
type: one ofhttp,tcp,udp,ping,dns,database,heartbeat,mobile,domainorbrowserproject: required; a label that groups monitors togetherintervalSeconds: 30–3600, default 60, within your plan's minimumfailThreshold/recoveryThreshold: how many failed or successful checks in a row open or resolve an incident (default 2)confirmRegions: require a second region to confirm a failure before opening an incidentconfig: settings for the monitor type. For HTTP:url,method,expectedStatus,timeoutMs,keyword,jsonPath/jsonEquals
If a request would go over your plan's limits, the API returns 402. If a field is invalid, it returns 400 with a message naming the field.
4. Incidents
GET /api/incidents: list incidentsGET /api/incidents/:id: get one incident, with its timelinePOST /api/incidents/:id/ack: acknowledge an incident
5. Heartbeats (cron jobs)
A heartbeat monitor expects your job to call its URL at least everyexpectedIntervalSeconds (default 300) plus graceSeconds (default 60). If a ping is late, an incident opens. The next ping resolves it. You can copy the ping URL from the monitor's page. Any HTTP method works.
# crontab: run the backup, then ping only if it succeeded 0 2 * * * /usr/local/bin/backup.sh && curl -fsS https://halvyn.win/ping/YOUR_TOKEN
6. Mobile SDK events
Mobile monitors receive crash, ANR and launch events from your app. Send them with the monitor's app key:
curl -X POST https://halvyn.win/sdk/mobile/events \
-H "Content-Type: application/json" \
-d '{ "appKey": "YOUR_APP_KEY", "type": "crash", "payload": { "version": "2.4.1" } }'7. Status pages
A public status page's data is available without authentication atGET /api/public/status/:slug.
8. Need help?
Contact us with any question about the API.