Admin endpoints
Authentication, running checks on demand and reading the notification log.
The public page can be read without a token. To trigger checks or change
incidents and maintenance through HTTP, configure adminToken and send it
with requests under /admin/*. Without a token configured, those routes
stay closed.
Authentication
The token comes only from adminToken in the configuration. There is no
environment-variable fallback; omitting it keeps the management API closed.
| Situation | Response |
|---|---|
| No token configured | 503 { "error": "The management API is disabled. Set adminToken in heyo-status.config.ts." } |
| Missing or wrong header | 401 { "error": "Unauthorized." } |
Comparison is constant time, and the header is matched case-insensitively
against Bearer <token>.
Until you configure adminToken, management routes return
503. Keep the token out of source control when enabling them.
Generate one with openssl rand -hex 32 and provide it to the config from a
private secret source. Do not commit production credentials; there is no token
list to maintain. In the shell examples below, $ADMIN_TOKEN means the same
configured token; it is not an environment variable read by Heyo Status.
POST /admin/checks/run
Runs every configured monitor once, stores the results, reconciles automatic incidents and dispatches notifications. It is the same code path as the scheduler.
| Response | When |
|---|---|
200 | Results array. |
501 | { "error": "Manual checks require the status-page runtime." } — the app was built with createStatusApp() without a runChecks option. |
Call it from an external scheduler if your platform has no cron, or run it after deployment to verify a monitor change. It runs checks, but not the summary or cleanup jobs.
Summarize and cleanup have no route. Run them with heyo-status, with
scheduleStatusPage(), or through your platform's cron integration.
GET /admin/notifications/log
Every delivery attempt, newest first.
| Query | Type | Notes |
|---|---|---|
channelId | string | exact match |
eventType | any event name | comma-separated |
status | sent, failed | comma-separated |
limit | non-negative integer | |
offset | non-negative integer |
The log stores no payload, no webhook URL, no credentials and no recipient. It exists to debug delivery, not to replay it.
Incident and maintenance management
Documented in full in the incident endpoints and maintenance endpoints:
| Method | Path |
|---|---|
| POST | /admin/incidents |
| POST | /admin/incidents/:id/updates |
| PATCH | /admin/incidents/:id |
| DELETE | /admin/incidents/:id |
| POST | /admin/maintenance |
| PATCH | /admin/maintenance/:id |
| DELETE | /admin/maintenance/:id |
Scripting it
For a local or CI context, the CLI does the same without a token or a network round trip — it talks to the database directly: