API Reference
Real-time availability monitoring. Integrate uptime, latency, and alert data directly into your infrastructure.
Core Endpoints
Base URL: https://api.pingsled.io/v2. All responses are JSON-encoded. Pagination uses cursor-based navigation for datasets exceeding 100 records.
GET /checks
Retrieve all active monitoring checks. Supports filtering by status (up, down, paused) and protocol (http, ping, tcp). Returns check ID, target URL, interval, and last response time.
GET /checks/{id}/metrics
Fetch historical performance data for a specific check. Parameters: window (1h, 24h, 7d, 30d), resolution (1m, 5m, 15m). Returns arrays of timestamp, latency_ms, and packet_loss.
GET /alerts
List triggered alert events. Filters include severity (critical, warning), notification channel (webhook, email, slack), and resolution status. Paginated with 50 records per cursor.
POST /checks
Create a new uptime or performance check. Required payload: target, method, interval_seconds. Optional: locations (us-east-1, eu-west-1, ap-southeast-2), tags, and alert thresholds.
DELETE /checks/{id}
Permanently remove a check and its associated historical data. Requires write-scope token. Returns 204 No Content on success. Data retention policies apply for 30 days post-deletion.
GET /webhooks
Manage outbound webhook configurations. View delivery status, retry attempts, and signature verification keys. Supports custom JSON payloads and HTTP method overrides.
Request & Response Examples
Practical cURL snippets and expected JSON structures to accelerate integration.
Create an HTTP Check
curl -X POST https://api.pingsled.io/v2/checks \
-H "Authorization: Bearer plsk_live_8f3a9c2e1d4b7f6a" \
-H "Content-Type: application/json" \
-d '{"target":"https://app.example.com","method":"http","interval_seconds":30,"locations":["us-east-1","eu-west-1"]}'
Success Response (201)
{
"id": "chk_9a8b7c6d5e4f",
"target": "https://app.example.com",
"status": "active",
"created_at": "2024-03-15T08:22:11Z",
"next_check": "2024-03-15T08:22:41Z"
}
Fetch Latency Metrics
curl "https://api.pingsled.io/v2/checks/chk_9a8b7c6d5e4f/metrics?window=24h&resolution=5m" \
-H "Authorization: Bearer plsk_live_8f3a9c2e1d4b7f6a"
Error Handling (400)
{
"error": "validation_failed",
"message": "Invalid interval_seconds. Must be between 30 and 3600.",
"code": 400,
"request_id": "req_7f2e1a9b8c3d"
}
Authentication & Security
All API requests require a valid Bearer token passed in the Authorization header. Tokens are scoped to your workspace and support read-only or read-write permissions.
Generate Tokens
Navigate to Settings > API Keys in your dashboard. Click "Create Token" and assign the required scope. Store tokens securely; they cannot be recovered once dismissed.
Rate Limits
Standard tier: 1,200 requests/minute. Enterprise tier: 5,000 requests/minute. Exceeding limits returns HTTP 429 with a Retry-After header. Burst allowance is capped at 150 requests per 10-second window.
Header Format
Authorization: Bearer plsk_live_8f3a9c2e1d4b7f6a
Always use HTTPS. Requests without valid credentials receive HTTP 401. IP whitelisting is available for Enterprise workspaces under Security > Network Access.