Skip to main content

HTTP Error Status Codes

All Hiya APIs return a status code of 2xx (200/201/202/204/206) if they were called correctly and there weren't any issues with the request.

Otherwise, they'll return one of the following error codes:

StatusDescription
301/302: Moved Permanently/FoundThis API is in the process of being deprecated and you must update the code.
400: Bad RequestA required parameter is missing or has an invalid value.
401: UnauthorizedThe API Key is invalid or missing.
403: ForbiddenThe API Key doesn't have the necessary authorization to access this resource
404: Not FoundThis API doesn't exist (or has been fully deprecated) or resource not found
408: Request TimeoutA complete request was not received by the server within its allotted timeout period. Retry.
409: ConflictResource already exists.
415: Unsupported Media TypeContent-Type, Content-Encoding or payload of the request is not supported.
429: Too Many RequestsThe number of requests within a given time period was exceeded.
500: Internal Server ErrorThe server has experienced an unexpected condition and is unable to process the request.

In addition, in the case of a 4xx or 5xx status code, the body of the API response might include an object with more information about the error(s):

{
"error": {
"id": "eeffac7a055740fab1d31d7626116cc8",
"code": 400,
"errors": [
{
"message": "Display name cannot be empty"
},
{
"message": "Malformed phone number"
}
]
}
}

Generally the API will return only a singular error at once, multiple errors could be returned only while validating the request json itself, so there is no guarantee that the API returns all errors in one turn.

PropertyTypeDescription
error.idstringA unique error ID
error.codeintEquals to the returned http status code
error.errors[*].messagestringArray of error messages

We recommend you log all errors and the associated API request that returned this error in case it's necessary to investigate an issue.