> ## Documentation Index
> Fetch the complete documentation index at: https://docs.dojah.io/llms.txt
> Use this file to discover all available pages before exploring further.

# API Response Codes and Error Handling

> Decode every Dojah API response. HTTP status codes, error messages, and reference IDs so you can handle success and failure in your app.

<Warning>
  All file links (e.g. selfie URLs, document URLs) returned in the response expire within **one hour**. We strongly recommend transferring these documents and images to your own infrastructure as soon as you receive them. If a link expires before you are able to download the file, call the [Fetch KYC widget Verification Data](/docs/technical-reference/get-verification-details) or  [Fetch Address Verification Data](/docs/address-verification/fetch-address-verification-data) endpoint to generate a new link — which will also expire in one hour.
</Warning>

### Successful Response

#### ✅ `200 OK`: Request Successful

The request was successfully processed. The response body contains the expected data.

***

#### Client Errors

***

#### 🚫 `400 Bad Request`: Invalid Request

The request payload is malformed or missing required fields.\
***Tip:** Double-check your body parameters or query strings.*

#### 🔒 `401 Unauthorized`: Invalid API Key

The API key is missing, invalid, or expired.\
***Tip:** Make sure your `Authorization` header is present and correct*

#### 💳 `402 Payment Required`: Top-Up Your Balance

The request cannot be completed due to low balance.\
***Tip:** Check your dashboard billing section to top-up.*

#### ❌ `403 Forbidden`: Access Denied

You don’t have permission to access this resource.\
***Tip:** Check if the endpoint is available on your plan or contact support.*

#### 🔍 `404 Not Found`: Resource Not Found

The requested endpoint or identifier was not found.\
***Tip:** Check for typos or invalid resource IDs.*

#### 🔁 `405 Method Not Found`: Invalid Method

The request method is not allowed.\
*Tip: Check the URL or rollback recent upgrades.*

#### ⏳ `408 Request Timeout`: Request Timed Out

Your request took longer than expected.\
*Tip: Check your internet connection or retry the request.*

#### 💥 `424 Failed Dependency`: Third-party Failure

The request failed because a dependent service did not respond or failed.\
*Tip: Retry or check the status of integrated services.*

#### 🚦 `429 Too Many Requests`: Rate Limit Exceeded

You’ve sent too many requests in a short period.\
*Tip: Slow down and retry after a while.*

***

#### Server Errors

***

### 💥 `500 Internal Server Error`: Unexpected Error

Something went wrong on Dojah’s side.\
**Tip:** Try again later or report it.

### ⏱️ `504 Gateway Timeout`: Request Timed Out

The system didn’t respond in time.\
**Tip:** Retry or reduce payload complexity if possible.
