APIBeta

Errors

How the API reports an error, and what each code means.

The API uses the HTTP status code to tell whether a call worked. A 2xx status means it worked. A 4xx status means the call cannot succeed as it was sent. A 5xx status means something failed on the Redokun side.

Error body

Every error answer has the same JSON body:

{
  "status": "error",
  "error": "The API key is missing or not valid",
  "code": "UNAUTHENTICATED"
}
FieldDescription
statusAlways error, so a client can tell an error from a payload
codeA stable identifier for the cause. Match on this
errorWhat went wrong, in English. Written for a person reading a log; it can change, so do not match on it

Error codes

StatusCodeMessageCause
401UNAUTHENTICATEDThe API key is missing or not validNo key, or a key that is malformed, unknown or revoked. See Authentication
403FEATURE_NOT_ENABLEDPublic API access is not enabled for this teamThe plan of the team does not include the API
403ACCOUNT_NOT_ACTIVEThis account cannot use the API right nowThe account is disabled, or the subscription of the team is suspended or expired
403INSUFFICIENT_SCOPEThis API key is only allowed to readThe key is Read only and the call writes
404NOT_FOUNDNo endpoint matches this method and pathThe path does not exist, or it exists but not with this method
429RATE_LIMITEDToo many requests. Slow down and retry after the time in the Retry-After header.The key has used up its call budget. See Rate limits
500GENERIC_ERRORAn unexpected error occurredSomething failed on the Redokun side

A wrong method on an existing path gets 404, not 405: for example, POST /v1/me.

Handling errors

StatusWhat to do
401, 403, 404Do not retry. The same call gets the same answer until you fix the key, the access or the request
429Wait the number of seconds in the Retry-After header, then retry
500Retry later, with a growing delay between attempts. If it keeps failing, write to support@redokun.com

On this page