Response codes

The responses to API calls from Cleo use the HTTP status code convention to indicate whether the call was successful or failed.

CodeMeaningDescription
200OKThe request was successful
201CreatedThe call was successful, and a new object or group of objects was created
400Bad RequestThe request contains invalid information and shouldn't be repeated
401UnauthorizedYou did not provide the API Key in the header of the request, or it was formatted incorrectly
403ForbiddenBased on the API Key you provided in the header, you do not have permission to make this type of call
404Not FoundAccording to the API Key provided in the header, the resource does not exist. This may also indicate that you are not allowed to make this type of call
500Internal Server ErrorOur servers stumbled upon a problem and we are working non-stop to solve it

Errors usually include more details in the response body, in the properties statusCode, message, and error. The statusCodeand errorcorrespond to the Code and Meaning sections in the table above, while the message contains more information about the error, such as missing or incorrect parameters, as an example.

Below is an example of an error callback:

{
  "statusCode": "NNN",
  "message": ["ERROR"],
  "error": "string"
}