Errors
Zoho Desk uses HTTP status codes to indicate success or failure of API calls. Status codes in the 2xx range indicate success, 4xx range indicate error in the information provided, and 5xx range indicate server side errors. The following table lists some commonly used HTTP status codes.
HTTP Status Codes
| Status Code | Description |
| 200 | OK |
| 201 | Created |
| 204 | No content |
| 400 | Bad request |
| 401 | Unauthorized |
| 403 | Forbidden (Unauthorised access) |
| 404 | URL not found |
| 405 | Method not allowed (Method called is not supported for the API invoked) |
| 413 | Payload Too Large |
| 415 | Unsupported Media Type |
| 422 | Unprocessable Entity |
| 429 | Too Many Requests |
| 500 | Internal error |
Besides HTTP status codes and their corresponding error messages, error responses for Zoho Desk APIs also include a machine-parsable errorCode param to simplify error handling.
The different errorCodes and their uses are described below.
UNAUTHORIZED
This errorCode value appears if the authentication token in the API request is invalid
INVALID_OAUTH
This errorCode value appears if the OAuthToken is invalid or expired.
SCOPE_MISMATCH
This errorCode value appears if the OAuthToken does not contain the scope required to perform the operation.
OAUTH_ORG_MISMATCH
This errorCode value appears if the user chooses a different organization while generating the OAuthToken instead of the organization in which they want to perform the operation.
FORBIDDEN
This errorCode value appears if the user does not have all the permissions required to access the resource.
LICENSE_ACCESS_LIMITED
This errorCode value appears if the user is unable to perform an action due to the limitations of the Zoho Desk edition in use
The possible values for the feature key are
The possible values for the editionType key are
FREE
EXPRESS
STANDARD
PROFESSIONAL
ENTERPRISE
URL_NOT_FOUND
This errorCode value appears if the URL provided is invalid or does not exist.
METHOD_NOT_ALLOWED
This errorCode value appears if the method in the API request is known by the server but disabled for the API requested.
RESOURCE_SIZE_EXCEEDED
This errorCode value appears if the size of the resource exceeds the limit defined by the server.
This errorCode value appears if the server refuses the request as a result of receiving the input in an unsupported format.
INVALID_DATA
This errorCode value appears if there are inaccuracies, such as duplicate entries or invalid IDs, in the data given by the user. The type of inaccuracy is identified by the errorType param.
The possible values for the errorType key are:
- invalid - the field contains an invalid value
- duplicate - the field contains a value that already exists
- missing - the field does not contain a value
The field that contains the inaccurate value is returned in the fieldName param, which is represented in the JSON Pointer convention
UNPROCESSABLE_ENTITY
This errorCode value appears if the input does not fulfil the conditions necessary for successfully executing the API.
ONLY_LIVECHAT_USER
This errorCode value appears if the API request tries to remove the last user remaining in a department that has live chat enabled
DUPLICATE_CONTRACT
This errorCode value appears if the user creates a contract for an SLA with existing or overlapping time periods.
- The key existingContracts is an array containing one or more contract entities.
INTEGRATION_ADMIN_ERROR
This errorCode value appears if the API request tries to deactivate a user who has enabled integrations in the help desk portal
The integration param returns the integration the user enabled in the portal. The possible values are :
THRESHOLD_EXCEEDED
This errorCode value appears if the user sends too many requests within a given amount of time ("rate limiting").
TOO_MANY_REQUESTS
This errorCode value appears if the user fires too many requests in a simultaneous/concurrent manner ("rate limiting").
INTERNAL_SERVER_ERROR
This errorCode value appears if the server encounters an unexpected condition that prevents it from fulfilling the request.