MonitorAH API
Programmatic access to MonitorAH monitors, events, notifications, and status pages. All endpoints require either a session cookie (dashboard) or a Bearer API key with the relevant scope.
https://monitorah.comAuthentication
Every /api/v1/* endpoint accepts
two auth methods. The dashboard sends the session cookie; programmatic clients send a Bearer
API key.
Authorization: Bearer mon_live_… Create a key from Developer → API keys. Keys are scoped (e.g. monitors:write) and can be
revoked instantly.
Cookie: session=… Set automatically after magic-link sign in. Sessions have all scopes.
Errors
Every error response follows the same envelope:
{
"error": {
"code": "validation_error",
"message": "Request body must be valid JSON",
"details": { ... }
}
} Pagination
List endpoints use cursor pagination. Pass ?cursor=<opaque>&limit=50 (max 100). The response includes meta.nextCursor when more results
are available.
GET /api/v1/monitors?limit=50
{
"data": [ /* monitors */ ],
"meta": { "nextCursor": "eyJpZCI6IjQyIn0", "hasMore": true }
}Analytics
get /api/v1/analytics/{monitorId} Monitor analytics
Monitor analytics
Parameters
- monitorId (path) *
- from (query)
- to (query)
Responses
- 200 Analytics
Example curl
curl https://monitorah.com/api/v1/analytics/{monitorId} \
-X GET \
-H "Authorization: Bearer mon_live_…"API keys
get /api/v1/api-keys List API keys
List API keys
Responses
- 200 Keys
Example curl
curl https://monitorah.com/api/v1/api-keys \
-X GET \
-H "Authorization: Bearer mon_live_…"post /api/v1/api-keys Create API key
Create API key
Responses
- 201 Created (full key returned once)
Example curl
curl https://monitorah.com/api/v1/api-keys \
-X POST \
-H "Authorization: Bearer mon_live_…"delete /api/v1/api-keys/{id} Revoke API key
Revoke API key
Parameters
- id (path) *
Responses
- 204 Revoked
Example curl
curl https://monitorah.com/api/v1/api-keys/{id} \
-X DELETE \
-H "Authorization: Bearer mon_live_…"Events
get /api/v1/events List downtime events
List downtime events
Responses
- 200 Events
Example curl
curl https://monitorah.com/api/v1/events \
-X GET \
-H "Authorization: Bearer mon_live_…"get /api/v1/events/{id} Get event
Get event
Parameters
- id (path) *
Responses
- 200 Event
Example curl
curl https://monitorah.com/api/v1/events/{id} \
-X GET \
-H "Authorization: Bearer mon_live_…"patch /api/v1/events/{id} Resolve event
Resolve event
Parameters
- id (path) *
Responses
- 200 Resolved
Example curl
curl https://monitorah.com/api/v1/events/{id} \
-X PATCH \
-H "Authorization: Bearer mon_live_…"heartbeat
get /api/v1/heartbeat/{token} Send heartbeat by public token (anonymous)
Send heartbeat by public token (anonymous)
Parameters
- token (path) *
Responses
- 200 Acknowledged
Example curl
curl https://monitorah.com/api/v1/heartbeat/{token} \
-X GET \
-H "Authorization: Bearer mon_live_…"post /api/v1/heartbeat/{token} Send heartbeat by public token (anonymous)
Send heartbeat by public token (anonymous)
Parameters
- token (path) *
Responses
- 200 Acknowledged
Example curl
curl https://monitorah.com/api/v1/heartbeat/{token} \
-X POST \
-H "Authorization: Bearer mon_live_…"Monitors
get /api/v1/monitors List monitors
List monitors
Parameters
- cursor (query)
- limit (query)
- type (query)
- status (query)
- isActive (query)
Responses
- 200 Monitors
Example curl
curl https://monitorah.com/api/v1/monitors \
-X GET \
-H "Authorization: Bearer mon_live_…"post /api/v1/monitors Create monitor
Create monitor
Request body
Responses
- 201 Created
- 402 Plan monitor limit reached
- 422 Validation error
Example curl
curl https://monitorah.com/api/v1/monitors \
-X POST \
-H "Authorization: Bearer mon_live_…" \
-H "Content-Type: application/json" \
-d '{"...":"..."}'get /api/v1/monitors/{id} Get monitor
Get monitor
Parameters
- id (path) *
Responses
- 200 Monitor
Example curl
curl https://monitorah.com/api/v1/monitors/{id} \
-X GET \
-H "Authorization: Bearer mon_live_…"patch /api/v1/monitors/{id} Update monitor
Update monitor
Parameters
- id (path) *
Responses
- 200 Updated
Example curl
curl https://monitorah.com/api/v1/monitors/{id} \
-X PATCH \
-H "Authorization: Bearer mon_live_…"delete /api/v1/monitors/{id} Delete monitor
Delete monitor
Parameters
- id (path) *
Responses
- 204 Deleted
Example curl
curl https://monitorah.com/api/v1/monitors/{id} \
-X DELETE \
-H "Authorization: Bearer mon_live_…"post /api/v1/monitors/{id}/check Run on-demand check
Run on-demand check
Parameters
- id (path) *
Responses
- 200 Check result
Example curl
curl https://monitorah.com/api/v1/monitors/{id}/check \
-X POST \
-H "Authorization: Bearer mon_live_…"post /api/v1/monitors/{id}/heartbeat Send heartbeat (dead-man switch)
Send heartbeat (dead-man switch)
Parameters
- id (path) *
Responses
- 200 Acknowledged
Example curl
curl https://monitorah.com/api/v1/monitors/{id}/heartbeat \
-X POST \
-H "Authorization: Bearer mon_live_…"get /api/v1/monitors/{id}/logs List check logs
List check logs
Parameters
- id (path) *
Responses
- 200 Logs
Example curl
curl https://monitorah.com/api/v1/monitors/{id}/logs \
-X GET \
-H "Authorization: Bearer mon_live_…"Notification channels
get /api/v1/notification-channels List channels
List channels
Responses
- 200 Channels
Example curl
curl https://monitorah.com/api/v1/notification-channels \
-X GET \
-H "Authorization: Bearer mon_live_…"post /api/v1/notification-channels Create channel
Create channel
Responses
- 201 Created
Example curl
curl https://monitorah.com/api/v1/notification-channels \
-X POST \
-H "Authorization: Bearer mon_live_…"patch /api/v1/notification-channels/{id} Update channel
Update channel
Parameters
- id (path) *
Responses
- 200 Updated
Example curl
curl https://monitorah.com/api/v1/notification-channels/{id} \
-X PATCH \
-H "Authorization: Bearer mon_live_…"delete /api/v1/notification-channels/{id} Delete channel
Delete channel
Parameters
- id (path) *
Responses
- 204 Deleted
Example curl
curl https://monitorah.com/api/v1/notification-channels/{id} \
-X DELETE \
-H "Authorization: Bearer mon_live_…"Notification rules
get /api/v1/notification-rules List rules
List rules
Responses
- 200 Rules
Example curl
curl https://monitorah.com/api/v1/notification-rules \
-X GET \
-H "Authorization: Bearer mon_live_…"post /api/v1/notification-rules Create rule
Create rule
Responses
- 201 Created
Example curl
curl https://monitorah.com/api/v1/notification-rules \
-X POST \
-H "Authorization: Bearer mon_live_…"delete /api/v1/notification-rules/{id} Delete rule
Delete rule
Parameters
- id (path) *
Responses
- 204 Deleted
Example curl
curl https://monitorah.com/api/v1/notification-rules/{id} \
-X DELETE \
-H "Authorization: Bearer mon_live_…"Status pages
get /api/v1/status-pages List status pages
List status pages
Responses
- 200 Status pages
Example curl
curl https://monitorah.com/api/v1/status-pages \
-X GET \
-H "Authorization: Bearer mon_live_…"post /api/v1/status-pages Create status page
Create status page
Responses
- 201 Created
Example curl
curl https://monitorah.com/api/v1/status-pages \
-X POST \
-H "Authorization: Bearer mon_live_…"get /api/v1/status-pages/{id} Get status page
Get status page
Parameters
- id (path) *
Responses
- 200 Status page
Example curl
curl https://monitorah.com/api/v1/status-pages/{id} \
-X GET \
-H "Authorization: Bearer mon_live_…"patch /api/v1/status-pages/{id} Update status page
Update status page
Parameters
- id (path) *
Responses
- 200 Updated
Example curl
curl https://monitorah.com/api/v1/status-pages/{id} \
-X PATCH \
-H "Authorization: Bearer mon_live_…"delete /api/v1/status-pages/{id} Delete status page
Delete status page
Parameters
- id (path) *
Responses
- 204 Deleted
Example curl
curl https://monitorah.com/api/v1/status-pages/{id} \
-X DELETE \
-H "Authorization: Bearer mon_live_…"get /api/v1/status-pages/{slug}/public Public status page data (no auth)
Public status page data (no auth)
Parameters
- slug (path) *
Responses
- 200 Public status page
Example curl
curl https://monitorah.com/api/v1/status-pages/{slug}/public \
-X GET \
-H "Authorization: Bearer mon_live_…"Subscription
get /api/v1/subscription Get current subscription
Get current subscription
Responses
- 200 OK
Example curl
curl https://monitorah.com/api/v1/subscription \
-X GET \
-H "Authorization: Bearer mon_live_…"post /api/v1/subscription Cancel subscription at period end
Cancel subscription at period end
Responses
- 200 Scheduled cancellation
Example curl
curl https://monitorah.com/api/v1/subscription \
-X POST \
-H "Authorization: Bearer mon_live_…"post /api/v1/subscription/checkout Create Stripe checkout session
Create Stripe checkout session
Responses
- 200 Checkout URL
Example curl
curl https://monitorah.com/api/v1/subscription/checkout \
-X POST \
-H "Authorization: Bearer mon_live_…"post /api/v1/subscription/portal Create Stripe billing portal session
Create Stripe billing portal session
Responses
- 200 Portal URL
Example curl
curl https://monitorah.com/api/v1/subscription/portal \
-X POST \
-H "Authorization: Bearer mon_live_…"Health
get /api/v1/health Health check (anonymous, minimal)
Health check (anonymous, minimal)
Responses
- 200 Status only — { status: "ok" | "degraded" }
Example curl
curl https://monitorah.com/api/v1/health \
-X GET \
-H "Authorization: Bearer mon_live_…"get /api/v1/health/details Detailed health (admin only)
Detailed health (admin only)
Responses
- 200 Full health info: dbConnected, cronRunning, version, serverTime
- 403 Not an admin
Example curl
curl https://monitorah.com/api/v1/health/details \
-X GET \
-H "Authorization: Bearer mon_live_…"Schemas
Error
{
"type": "object",
"required": [
"error"
],
"properties": {
"error": {
"type": "object",
"required": [
"code",
"message"
],
"properties": {
"code": {
"type": "string"
},
"message": {
"type": "string"
},
"details": {}
}
}
}
}PageMeta
{
"type": "object",
"properties": {
"nextCursor": {
"type": "string",
"nullable": true
},
"hasMore": {
"type": "boolean"
}
}
}MonitorType
{
"type": "string",
"enum": [
"PING",
"HTTP",
"SSL",
"DNS",
"PORT",
"WHOIS",
"BLACKLIST",
"HEARTBEAT"
]
}MonitorStatus
{
"type": "string",
"enum": [
"UP",
"DOWN",
"UNKNOWN"
]
}Monitor
{
"type": "object",
"required": [
"id",
"name",
"type",
"target",
"checkInterval",
"isActive",
"lastStatus"
],
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"type": {
"$ref": "#/components/schemas/MonitorType"
},
"target": {
"type": "string"
},
"config": {
"type": "object",
"additionalProperties": true
},
"checkInterval": {
"type": "integer",
"minimum": 15
},
"isActive": {
"type": "boolean"
},
"lastCheckAt": {
"type": "string",
"format": "date-time",
"nullable": true
},
"lastStatus": {
"$ref": "#/components/schemas/MonitorStatus"
},
"createdAt": {
"type": "string",
"format": "date-time"
}
}
}MonitorCreate
{
"type": "object",
"required": [
"name",
"type",
"target"
],
"properties": {
"name": {
"type": "string",
"maxLength": 120
},
"type": {
"$ref": "#/components/schemas/MonitorType"
},
"target": {
"type": "string"
},
"config": {
"type": "object",
"additionalProperties": true
},
"checkInterval": {
"type": "integer",
"minimum": 15,
"maximum": 86400
},
"isActive": {
"type": "boolean"
}
}
}DowntimeEvent
{
"type": "object",
"required": [
"id",
"monitorId",
"startedAt",
"resolved"
],
"properties": {
"id": {
"type": "string"
},
"monitorId": {
"type": "string"
},
"startedAt": {
"type": "string",
"format": "date-time"
},
"endedAt": {
"type": "string",
"format": "date-time",
"nullable": true
},
"durationSeconds": {
"type": "integer",
"nullable": true
},
"resolved": {
"type": "boolean"
}
}
}