Errors
The Pinger API uses standard HTTP status codes to indicate the success or failure of an API request. In general, codes in the 2xx range indicate success. Codes in the 4xx range indicate an error that failed given the information provided (e.g., a required parameter was omitted). Codes in the 5xx range indicate a rare error with Pinger's servers.
Error Response Format
When a request fails, the API returns a JSON response containing an error property with a brief description. For validation errors (like a 400 Bad Request), a details object may also be present, providing field-specific validation failures.
Example Validation Error (400)
{
"error": "Invalid fields",
"details": {
"fieldErrors": {
"target": ["Required"],
"intervalSeconds": ["Number must be greater than or equal to 60"]
}
}
}HTTP Status Code Reference
| Code | Meaning | Resolution |
|---|---|---|
200 OK | Success | The request completed successfully. |
201 Created | Created | The monitor or resource was successfully created. |
400 Bad Request | Validation Error | Check the details object. Ensure all required fields (like name, type, and target) are provided and correctly typed. |
401 Unauthorized | Authentication Failed | Provide a valid API key in the Authorization: Bearer header. See Authentication. |
403 Forbidden | Insufficient Scope | Your API key is valid, but lacks the necessary scope (e.g., monitors:write) to perform this action. |
404 Not Found | Resource Missing | The requested monitor or status page does not exist, or does not belong to your workspace. |
429 Too Many Requests | Rate Limited | You have exceeded your plan's API quota. See Rate Limits for details. |
500 Internal Error | Server Failure | An unexpected error occurred on Pinger's backend. If this persists, contact support. |