Status codes and errors messages
The Middesk API is organized around REST. Our API has predictable, resource-oriented URLs and uses HTTP response codes to indicate API errors. JSON is returned by all API responses, including errors.
The Middesk API has rate limiting to ensure high performance across all customers. Requests per customer are limited to 20 requests per second.
Status codes
Middesk uses standard HTTP response codes to indicate the success or failure of an API request.
As a rule of thumb, codes in the 2xx range indicate success. Codes in the 4xx range indicate an error in the provided information (for example, a required parameter was omitted or a validation error occurred).
Codes in the 5xx range indicate an error with Middesk servers. These should be extremely rare.
Some 2xx and 4xx errors include additional context in the response body.
Error messages
When Middesk encounters an error processing a request, Middesk returns a 4xx or 5xx status code and a JSON response containing information about the error. The errors array contains one or more Error objects.
Each Error object contains a message field explaining the error. Some Error objects contain an optional parameter field that highlights what specific field caused the error.