We rely on standardized HTTP error codes to indicate there was an error with the API call.
4xx - request errors
These errors usually mean that something is wrong on the client side.
400 Bad Request
Indicates that request did not pass validation. For example, missing required parameters, or having a wrong data type for a specific parameter.
401 Unauthorized
Indicates that the request is missing authorization headers, or that given authorization headers are invalid. Your API key needs to be supplied in the X-API-KEY
header.
403 Forbidden
Indicates that the the holder of the API key doesn't have the permission to access this resource or operation. If you encounter this error, consider upgrading your ClickGUARD account tier.
404 Not Found
Indicates that the resource does not exist. For example when you're trying to activate a protaction rule that is removed from your account.
429 Too Many Requests
ClickGUARD API is protected with a gentle rate limiter. If you're making too many requests in a short period of time, the API will tell you to slow down.
5xx - server errors
These errors usually indicate server problems. This is unexpected and probably temporary, and means that something went wrong on our side.
If these errors persist, please contact ClickGUARD support.
HTTP 400 error example
{
"code": "BAD_REQUEST",
"message": "Bad request",
"description": "Missing required param: period"
}
HTTP 403 error example
{
"code": "NO_ACCESS",
"message": "Permission denied",
"description": "Your account tier does not have access to this operation"
}