Errors

Our API uses standard HTTP status codes to indicate errors.

In general, 2xx status codes indicate success, 4xx status codes indicate bad requests (incorrect authentication credentials, missing parameters and so on) and 5xx status codes indicate server errors.

Most error responses will also contain details about the error. Each error object will have a code and message. For example,

{ "code": 2, "message": "Invalid protocol" }

Common status codes:

  • 200 OK, 201 Created, 204 No Content - success
  • 400 Bad Request - incorrect API usage
  • 401 Unauthorized - incorrect or missing authentication credentials
  • 404 Not Found - the requested resource does not exist
  • 405 Method Not Allowed - the HTTP method is not allowed
  • 415 Unsupported Media Type - missing or incorrect Content-Type
  • 422 Unprocessable Entity - validation errors
  • 429 Too Many Requests - too many requests
  • 500 Internal Server Error - server error