API Reference

The Haspulse REST API lets you manage checks, projects, and channels programmatically.

Authentication

All API requests require authentication via an API key. Include your key in the Authorization header:

Authorization: Bearer hp_your_api_key

Create API keys in your project settings. Keys are scoped to a single project.

Base URL

https://api.haspulse.io/v1

Endpoints

Ping (Public)

Send pings to your checks. No authentication required.

GET  /ping/:checkId          # Success ping
GET  /ping/:checkId/start    # Job started
GET  /ping/:checkId/fail     # Job failed
POST /ping/:checkId          # Success with body

Checks

GET    /v1/checks                    # List checks in project
GET    /v1/checks/:id                # Get check details
POST   /v1/checks                    # Create check
PATCH  /v1/checks/:id                # Update check
DELETE /v1/checks/:id                # Delete check
POST   /v1/checks/:id/pause          # Pause check
POST   /v1/checks/:id/resume         # Resume check
GET    /v1/checks/:id/stats          # Uptime stats

Projects

GET    /v1/projects                  # List projects
GET    /v1/projects/:id              # Get project
POST   /v1/projects                  # Create project
PATCH  /v1/projects/:id              # Update project
DELETE /v1/projects/:id              # Delete project

Channels

GET    /v1/channels                  # List channels
GET    /v1/channels/:id              # Get channel
POST   /v1/channels                  # Create channel
PATCH  /v1/channels/:id              # Update channel
DELETE /v1/channels/:id              # Delete channel
POST   /v1/channels/:id/test         # Send test notification

Incidents

GET    /v1/incidents                 # List incidents
GET    /v1/incidents/:id             # Get incident
POST   /v1/incidents                 # Create incident
PATCH  /v1/incidents/:id             # Update incident
DELETE /v1/incidents/:id             # Delete incident
POST   /v1/incidents/:id/updates     # Add status update

Maintenance

GET    /v1/maintenance               # List maintenance windows
GET    /v1/maintenance/:id           # Get maintenance window
POST   /v1/maintenance               # Create maintenance window
PATCH  /v1/maintenance/:id           # Update maintenance window
DELETE /v1/maintenance/:id           # Delete maintenance window

Organizations

GET    /v1/organizations             # List organizations
GET    /v1/organizations/:id         # Get organization
POST   /v1/organizations             # Create organization
PATCH  /v1/organizations/:id         # Update organization
DELETE /v1/organizations/:id         # Delete organization

API Keys

GET    /v1/api-keys                  # List API keys
POST   /v1/api-keys                  # Create API key
DELETE /v1/api-keys/:id              # Delete API key

Error Responses

All errors return a JSON object with error and message fields:

{
  "error": "NOT_FOUND",
  "message": "Check not found"
}

Common Error Codes

  • 400 — Bad request (invalid input)
  • 401 — Unauthorized (invalid or missing API key)
  • 403 — Forbidden (no access to resource)
  • 404 — Not found
  • 429 — Rate limited
  • 500 — Server error

Rate Limits

API requests are rate limited to 100 requests per minute per API key.

Ping endpoints (/ping/*) have higher limits: 1000 requests per minute per check.