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

# Gateway Generated Responses

> Understand the meaning of the responses produced by the API gateway.

For some API requests, the response body is created by the gateway. This is usually the case in error situations or changing the response generated by the actual API server.

A header is sent through which you can check whether a request was generated by the gateway. If the response headers contain the following header, this indicates that the request was created by the gateway:

```
X-Jojapi-Gateway-Response: true
```

Let’s examine the responses generated by the gateway.

## **Error Messages**

Error messages contain a message. An example response is like this:

```
{"message":"Invalid Server"}
```

Below is a list of error messages:

| Message content                           | Status code | Description                                                                                                                                                 |
| ----------------------------------------- | ----------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Invalid Server                            | 400         | The request was sent to the wrong gateway address.                                                                                                          |
| Invalid URL                               | 400         | The request was sent to the wrong gateway URL.                                                                                                              |
| Invalid Path                              | 400         | The request was sent to the wrong gateway path.                                                                                                             |
| Invalid Endpoint                          | 400         | The request was sent to the wrong gateway endpoint.                                                                                                         |
| Unauthorized                              | 401         | You've sent an unauthorized request. You must include the API key in your request.                                                                          |
| Invalid API Key                           | 401         | You have submitted an invalid API key. You must submit a valid API key.                                                                                     |
| Subscription Not Found                    | 401         | You do not have an active subscription for the current API. Please check if you have a valid subscription.                                                  |
| Not Enough Credits                        | 402         | Your API plan has run out of credits. Renew your plan or upgrade to a higher plan.                                                                          |
| Insufficient Balance                      | 402         | You don't have enough funds to fulfill the request. Add funds to your account. Use the auto top-up feature for a smoother experience.                       |
| Your API Key is not available on this API | 403         | The API key you are using for the API you are sending the request to is restricted.                                                                         |
| User Blocked                              | 403         | Your account has been blocked.                                                                                                                              |
| Not Found                                 | 404         | You sent a request to an address that does not exist.                                                                                                       |
| API Not Found                             | 404         | You sent a request to an API address that does not exist.                                                                                                   |
| Endpoint Not Found                        | 404         | You sent a request to an endpoint address that does not exist.                                                                                              |
| Method Not Allowed                        | 405         | You used an unsupported request method.  The gateway currently only supports GET, POST, PUT, PATCH, DELETE methods.                                         |
| API Gateway Error                         | 500         | The API provider did not configure the API correctly.                                                                                                       |
| Server Timeout                            | 500         | The API request timed out. The gateway currently supports a maximum delay of 90 seconds.                                                                    |
| Server Error                              | 500         | An error occurred due to the target API server. Possible causes:<br />- The target server is unreachable.<br />- The target server SSL verification failed. |
| Invalid Response Code                     | 500         | The target API server returned an unsupported response status code.                                                                                         |
| Bad Response                              | 500         | The target API server returned an unsupported response body.                                                                                                |
| Target Server Error                       | 500         | The target servers specified by the API provider are invalid.                                                                                               |
