API access requires a Pro or Team plan.

API Documentation

Integrate Pinger.fyi with your applications using our REST API.

Authentication

All API requests require authentication using an API key. Create and manage API keys in your account settings.

curl -H "Authorization: Bearer pk_your_api_key" \
  https://pinger.fyi/api/v1/monitors

Base URL

https://pinger.fyi/api/v1

Monitors

GET/monitors

List all monitors in your account.

Response

{
  "data": [
    {
      "id": "123e4567-e89b-12d3-a456-426614174000",
      "name": "My Website",
      "url": "https://example.com",
      "method": "GET",
      "status": "up",
      "check_interval_seconds": 60,
      "is_paused": false,
      "last_checked_at": "2024-01-15T10:30:00Z"
    }
  ],
  "meta": { "count": 1 }
}
POST/monitors

Create a new monitor.

Request Body

{
  "name": "My Website",
  "url": "https://example.com",
  "method": "GET",              // optional, default: GET
  "check_interval_seconds": 60  // optional, default: 60
}
GET/monitors/:id

Get a single monitor with recent check results and uptime statistics.

Response

{
  "data": {
    "id": "123e4567-e89b-12d3-a456-426614174000",
    "name": "My Website",
    "url": "https://example.com",
    "status": "up",
    "uptime_24h": 99.95,
    "recent_checks": [
      {
        "status": "up",
        "response_time_ms": 245,
        "status_code": 200,
        "checked_at": "2024-01-15T10:30:00Z"
      }
    ]
  }
}
PATCH/monitors/:id

Update a monitor's settings.

Request Body

{
  "name": "Updated Name",        // optional
  "is_paused": true,             // optional
  "check_interval_seconds": 120  // optional
}
DELETE/monitors/:id

Delete a monitor and all its check results.

Status Pages

GET/status-pages

List all status pages in your account.

POST/status-pages

Create a new status page.

Request Body

{
  "name": "My Status Page",
  "slug": "my-status-page",
  "is_public": true  // optional, default: true
}

Error Responses

The API uses conventional HTTP response codes to indicate success or failure.

CodeDescription
200Success
201Created
400Bad Request - Invalid parameters
401Unauthorized - Invalid or missing API key
403Forbidden - Plan limit reached
404Not Found - Resource does not exist
429Too Many Requests - Rate limit exceeded
500Server Error

Error Response Format

{
  "error": "Error message here"
}

Rate Limits

API requests are rate limited to 100 requests per minute per API key. Rate limit headers are included in all responses.

X-RateLimit-Limit: 100
X-RateLimit-Remaining: 95
X-RateLimit-Reset: 1705312800

Questions about the API? Contact support