Skip to main content

API Reference

AlertifyPro exposes a REST API at /api/v1. All requests must be authenticated with a JWT Bearer token unless otherwise noted.

Self-hosted

If you are running AlertifyPro self-hosted, replace the base URL with your own deployment URL (e.g. http://localhost:3001).

Base URL

http://localhost:3001/api/v1

Authentication

All protected endpoints require a JWT Bearer token obtained from POST /api/v1/auth/login.

# Include the token in every request
curl http://localhost:3001/api/v1/services \
-H "Authorization: Bearer <your_jwt_token>"

JWT tokens expire after 72 hours. Re-authenticate to get a new token.


Available resources

ResourceBase pathDescription
Auth/api/v1/authRegister and login
Services/api/v1/servicesCreate and manage monitored services
Alerts/api/v1/alertsView, acknowledge, and resolve alerts
Alert rules/api/v1/alert-rulesConfigure alert conditions
Heartbeats/api/v1/heartbeatsManage heartbeat monitors
Heartbeat ping/api/v1/heartbeat/:keyReceive a heartbeat ping (public)
Notification channels/api/v1/notification-channelsManage Slack, email, PagerDuty, etc.
Metrics/api/v1/metricsService uptime and response time metrics
Maintenance windows/api/v1/maintenance-windowsSuppress alerts during planned downtime
Status pages/api/v1/status-pagesPublic status page management
SSL certificates/api/v1/ssl-certificatesSSL/TLS certificate monitoring
Escalation policies/api/v1/escalation-policiesMulti-step escalation configs
Teams/api/v1/teamsTeam management
API keys/api/v1/api-keysManage API keys
Organization/api/v1/organizationOrganization settings
Members/api/v1/membersManage organization members
Profile/api/v1/profileUser profile management

Health endpoints

These endpoints do not require authentication:

# Liveness probe
GET /api/v1/health
# Response: OK

# Readiness probe (checks database connectivity)
GET /api/v1/ready
# Response: {"status":"ready"} or {"status":"not ready","error":"..."}

Response format

All API responses return JSON with Content-Type: application/json.

Success:

{ "id": "uuid", "name": "My Service", ... }

Error:

{ "error": "description of what went wrong" }

Authentication

Register

POST /api/v1/auth/register
Content-Type: application/json

{
"email": "[email protected]",
"password": "your_password",
"full_name": "Your Name"
}

Response:

{
"message": "registered successfully",
"user_id": "uuid",
"org_id": "uuid"
}

Registration automatically creates a default organization for the user on the free plan (max 5 services).

Login

POST /api/v1/auth/login
Content-Type: application/json

{
"email": "[email protected]",
"password": "your_password"
}

Response:

{
"token": "eyJhbGci...",
"user_id": "uuid",
"org_id": "uuid"
}

Use the token as a Bearer token in subsequent requests. JWT claims include user_id, tenant_id, email, and exp (72 hours).


WebSocket

A real-time WebSocket connection is available at:

ws://localhost:3001/api/v1/ws

Authenticate via a query parameter token: ?token=<jwt>. Use the WebSocket feed to receive live check results without polling.