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" \

< 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 codeWhat we're saying
200 - OKEverything went well.
201 - CreatedThe resource was created.
204 - No contentThe response body is empty, but everything went well.
400 - Bad RequestYour request is malformed or invalid.
401 - UnauthorizedYour request is missing the Auth Token, or your credentials are invalid.
403 - ForbiddenYou have a valid Auth Token, but you don't have permission to do what you're doing.
404 - Not FoundThis error is shown when the requested resource does not exist.
429 - Too Many RequestsYou made too many requests within a time period. Try again later.
5xx - Server ErrorSomething went wrong on our end. Try again later or contact support if the error persists.