General
Integrations
How to
Configuration
APIBeta
Error handling
Panelbear uses standard HTTP status codes to indicate if your request succeeded or failed. In addition to the HTTP status code, we include a human-friendly message in JSON format.
$ curl -H "Authorization: Bearer <TOKEN>" \ -H "Content-type: application/json" \ "https://api.panelbear.com/v1/sites" < HTTP/1.1 401 Unauthorized < Content-Type: application/json { "message": "Unauthorized. Your credentials are missing or invalid." }
Let's agree on what the status codes mean. Here's a summary of what you might find:
Status code | What we're saying |
---|---|
200 - OK | Everything went well. |
201 - Created | The resource was created. |
204 - No content | The response body is empty, but everything went well. |
400 - Bad Request | Your request is malformed or invalid. |
401 - Unauthorized | Your request is missing the Auth Token, or your credentials are invalid. |
403 - Forbidden | You have a valid Auth Token, but you don't have permission to do what you're doing. |
404 - Not Found | This error is shown when the requested resource does not exist. |
429 - Too Many Requests | You made too many requests within a time period. Try again later. |
5xx - Server Error | Something went wrong on our end. Try again later or contact support if the error persists. |