Skip to content

HTTP codes

When integrating with the API, developers may encounter certain standard errors that provide insight into the nature of the issue and how to resolve it. These errors are designed to ensure consistent and predictable interactions. Below are the HTTP status codes used in this API:

HTTP CodesDescription
200On success when using synchronous endpoints
202On success when using asynchronous endpoints
401Unauthorized or Invalid API Key
404When a resource is not found
422When validation fails
429API Throttling
500An unexpected error occurred during the operation
502Bad Gateway

Error types

While an HTTP code may give you enough context in certain situations, it might not be enough to figure out the nature of the error. Whenever, there is a non-2XX response, the API returns an error object with a relevant type and a human readable message.

E.g

json
{
    "error": {
        "type": "INVALID_API_KEY",
        "message": "Forbidden"
    }
}

The table below provides an overview of common response types, their descriptions, and associated HTTP status codes to help you debug and handle these errors effectively.

Response TypeDefault Status CodeDescription
ACCESS_DENIED403Access denied due to failed authorization.
API_CONFIGURATION_ERROR500Invalid API configuration, such as incorrect endpoint or response mapping.
AUTHORIZER_CONFIGURATION_ERROR500Failed to connect to the authorizer.
AUTHORIZER_FAILURE500Authorizer failed to authenticate the caller..
BAD_REQUEST_PARAMETERS400Invalid request parameters. .
BAD_REQUEST_BODY400Invalid request body. .
EXPIRED_TOKEN403Authentication token has expired. .
INTEGRATION_FAILURE504Integration request failed. .
INTEGRATION_TIMEOUT504Integration request timed out. .
INVALID_API_KEY403Provided API key is invalid..
INVALID_SIGNATURE403AWS signature validation failed.
MISSING_AUTHENTICATION_TOKEN403Missing or invalid authentication token..
QUOTA_EXCEEDED429Usage quota exceeded.
REQUEST_TOO_LARGE413Request exceeds allowed size. Defaults to HTTP content length exceeded 10485760 bytes.
RESOURCE_NOT_FOUND404Requested resource does not exist..
THROTTLED429Request throttled due to rate limits..
UNAUTHORIZED401Caller failed authentication.
UNSUPPORTED_MEDIA_TYPE415Payload has an unsupported media type.
WAF_FILTERED403Request blocked by a Web Application Firewall (WAF).

In addition to the list above, each endpoint has its own unique set of error types, which are described in their respective sections.