DocumentationOpen PingAgain
Browse

Developer API

Monitors API

Create, list, update, pause, resume, and recheck monitors.

Use /api/v1/monitors to list and create monitors. Write requests require monitors:write; control actions require monitors:control.

List and create

curl --header "Authorization: Bearer ${PINGAGAIN_TOKEN}" \
  "${PINGAGAIN_BASE_URL}/api/v1/monitors?limit=50"

Create a Website through the same validation used by the customer interface:

curl --fail-with-body --request POST \
  --header "Authorization: Bearer ${PINGAGAIN_TOKEN}" \
  --header "Content-Type: application/json" \
  --data '{"type":"website","url":"https://example.com"}' \
  "${PINGAGAIN_BASE_URL}/api/v1/monitors"

Control a monitor

Monitor routes support the implemented update, pause, resume, and recheck actions. Use the public identifier returned by the API and follow the method and body described by the route response or current API reference.

Control requests are asynchronous with monitoring: a successful request accepts the action, while the next check result arrives later. Handle 404 as unavailable to this account rather than proof that an identifier never existed.

Next: see API authentication, pagination and errors, or supporting API workflows.