The Unkey API returns machine readable error codes to quickly identify the type of error.

Error codes are provided in the json response and usually accompanied by an error field providing more information.

{
    "code": "ERROR_CODE",
    "error": "here's what went wrong"
}

NOT_FOUND

The resource, such as an API or key was not found in the database. Please double check your request, maybe there is a typo or other mistake.

BAD_REQUEST

A general error meaning something about your request was malformed. Check the error field of the response to get a more detailed description.

UNAUTHORIZED

You do not have access to a resource. Maybe you are using the wrong token?

RATELIMITED

The key you’re trying to verify has exceede its ratelimit. Check the ratelimit fields in the response.

FORBIDDEN

You are not allowed to access a resource or perform an action.

USAGE_EXCEEDED

This key has used up all of its usage and needs to be refilled before being valid again.

INTERNAL_SERVER_ERROR

Something unexpected happened. Please check the error field and get in touch with us on Discord or Email.