UptimeGuard Docs

API Reference

Integrate UptimeGuard natively into your CI/CD pipelines, internal dashboards, or infrastructure automation using our RESTful API.

Authentication

All API requests require authentication using an API key generated from your dashboard. Include the key in the Authorization header using the Bearer schema.

Authorization: Bearer ug_live_abc123def456...

Quick Start (cURL)

curl -X GET \
  https://uptimeguard.com/api/monitors \
  -H "Authorization: Bearer ug_live_your_api_key_here"

Endpoints

1. List Monitors

Retrieve all monitors currently configured in your account.

  • Method: GET
  • Endpoint: /api/monitors

Example Response

[
  {
    "id": "uuid",
    "name": "Production Database",
    "url": "https://api.example.com/health",
    "status": "up",
    "uptime_percentage": 99.98,
    "monitor_type": "http",
    "created_at": "2023-10-24T10:00:00Z"
  }
]

2. Create Monitor

Create a new monitor. Requires a Pro plan for check intervals < 5 minutes or advanced network protocols (TCP, UDP, DNS).

  • Method: POST
  • Endpoint: /api/monitors

Request Body

{
  "name": "My New API",
  "url": "https://api.myapp.com",
  "monitor_type": "http", // "http", "ping", "tcp", "udp", "dns"
  "interval_seconds": 300,
  "expected_status": 200
}

Example Response

{
  "id": "uuid",
  "name": "My New API",
  "url": "https://api.myapp.com",
  "status": "pending"
}

3. Recent Incidents

Fetch the 50 most recent incidents across all your monitors.

  • Method: GET
  • Endpoint: /api/incidents

Example Response

[
  {
    "id": "uuid",
    "monitor_id": "uuid",
    "started_at": "2023-10-25T14:30:00Z",
    "resolved_at": null,
    "cause": "HTTP 502 Bad Gateway"
  }
]

On this page