> ## Documentation Index
> Fetch the complete documentation index at: https://jupiter-docs-beam-tx-jup-ag-submit.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Response Codes

> HTTP response codes for Jupiter APIs.

## Debugging

Every response includes an `x-api-gateway-request-id` header. This is the same request ID that appears in your team's [Request Logs](/portal/logs), so you can match a failed client request to its full server-side record (status, latency breakdown, firewall decision, credits consumed).

Log this header on every response. When reporting an issue to support, include it alongside the response body so we can look up the request immediately.

```typescript theme={null}
const response = await fetch("https://api.jup.ag/swap/v2/order?...", {
  headers: { "x-api-key": API_KEY },
});

if (!response.ok) {
  const requestId = response.headers.get("x-api-gateway-request-id");
  const body = await response.text();
  console.error(`[${response.status}] request=${requestId} body=${body}`);
}
```

<Note>
  Product-specific error codes are documented on each product's page.
</Note>

## HTTP status codes

| Code | Description  | Debug                                                                                                                                                                                                                                                                          |
| :--- | :----------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| 200  | Success      | Request completed successfully.                                                                                                                                                                                                                                                |
| 400  | Bad Request  | Check the request parameters and syntax.                                                                                                                                                                                                                                       |
| 401  | Unauthorised | Sent when you provide an invalid or unknown API key. A request with no `x-api-key` header is treated as keyless, not rejected. Check that your key is correct and active.                                                                                                      |
| 403  | Forbidden    | Either your API key lacks [permission](/portal/api-keys#permissions) for the endpoint (message: `API key does not have access to this endpoint`) or a [firewall](/portal/firewall) rule blocked the request (message: `Request blocked by firewall`).                          |
| 404  | Not Found    | Check the endpoint URL.                                                                                                                                                                                                                                                        |
| 429  | Rate Limited | You exceeded a rate limit. The message tells you which: `[API Gateway] Too many requests` is your plan limit, `Too many requests` is a [firewall](/portal/firewall) rate-limit rule. Slow down or implement backoff. See [Rate Limits](/portal/rate-limits) for details.       |
| 5xx  | Server Error | Retry with backoff. If persistent, submit a [Portal Enquiry](https://support.jup.ag/requests/new?ticket_form_id=18069133114012\&tf_18541841140892=api_or_developer) or reach out in [Discord Dev Support](https://discord.com/channels/897540204506775583/910250162402779146). |
