API Reference
The Pinger REST API allows you to programmatically manage your monitors. All endpoints are rooted at https://api.pingr.site/api/v1/ and require Bearer token authentication.
List Monitors
Retrieves a list of all monitors belonging to your workspace.
GET
/api/v1/monitors- Auth required: Yes
- Required Scope:
monitors:readormonitors:write
Response
200 OK
{
"monitors": [
{
"id": "11223344-5566-7788-9900-aabbccddeeff",
"name": "Production Website",
"type": "website",
"target": "https://pingr.site",
"intervalSeconds": 60,
"enabled": true,
"status": "healthy"
}
]
}Create Monitor
Creates a new monitor.
POST
/api/v1/monitors- Auth required: Yes
- Required Scope:
monitors:write
Request Body Schema
| Field | Type | Description |
|---|---|---|
name | string | Required. The name of the monitor. |
type | string | Required. The type of monitor (e.g. website, api, heartbeat). |
target | string | Required. The URL, IP, or dummy target (for heartbeats). |
intervalSeconds | number | Required. Frequency of checks in seconds. |
timeoutSeconds | number | Optional. Timeout limit in seconds. |
Example Request
cURL Request
curl -X POST https://api.pingr.site/api/v1/monitors \
-H "Authorization: Bearer pinger_xxxxxxxxxxxxxxxxx" \
-H "Content-Type: application/json" \
-d '{
"name": "API Health",
"type": "api",
"target": "https://api.pingr.site/health",
"intervalSeconds": 60,
"expectedStatus": 200
}'Response
201 Created
{
"monitor": {
"id": "11223344-5566-7788-9900-aabbccddeeff",
"name": "API Health",
"type": "api",
"target": "https://api.pingr.site/health",
"intervalSeconds": 60,
"enabled": true,
"status": "pending"
}
}Get a Monitor
Retrieves detailed information about a specific monitor by ID.
GET
/api/v1/monitors/:id- Auth required: Yes
- Required Scope:
monitors:readormonitors:write
Delete Monitor
Permanently deletes a monitor and all associated ping history and incidents.
DELETE
/api/v1/monitors/:id- Auth required: Yes
- Required Scope:
monitors:write
Response
200 OK
{
"success": true
}