Debugging
Every response includes anx-api-gateway-request-id header. This is the same request ID that appears in your team’s Request 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.
Product-specific error codes are documented on each product’s page.
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 for the endpoint (message: API key does not have access to this endpoint) or a 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 rate-limit rule. Slow down or implement backoff. See Rate Limits for details. |
| 5xx | Server Error | Retry with backoff. If persistent, submit a Portal Enquiry or reach out in Discord Dev Support. |
