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

# Error Codes

> HTTP status codes, MCP tool errors, and retry guidance.

## REST API HTTP Status Codes

| Status | Meaning | Action |
| - | - | - |
| `400` | Malformed request or prohibited query-string credentials. | Fix request formatting; send API keys in headers only. |
| `401` | Missing, invalid, or revoked API key. | Verify `Authorization: Bearer ask_...` or `X-API-Key`. |
| `402` | Organization workspace is not yet active or payment is past due. | Complete workspace activation in the Developer Portal. |
| `403` | Project is suspended or cross-origin browser request blocked on `/mcp`. | Re-enable the project or call from a server/native host. |
| `404` | Request, call, recording, or phone number not found in this project. | Verify the ID belongs to the authenticated project. |
| `405` | Unsupported HTTP method (e.g. `GET` or `DELETE` on stateless `/mcp`). | Use the documented HTTP method (`POST` for `/mcp`). |
| `409` | State conflict: clarification submitted when not in `needs_input`, or cancel attempted on an already `completed` or `failed` request (`request_already_terminal`). | Inspect current status via `GET /api/v1/requests/{request_id}`. |
| `422` | Input validation error (invalid E.164 phone, empty `targets` with auto-discovery disabled, unlinked `caller_id`, invalid form answers). | Fix the fields reported in the error payload and retry. |
| `429` | Rate limit exceeded. | Retry with exponential backoff and jitter. |
| `5xx` | Transient server error. | Retry safely with the same `Idempotency-Key`. |

## MCP Tool Error Payload

MCP tool calls return errors as structured `CallToolResult(isError=true)` objects rather than crashing the JSON-RPC transport:

```json theme={null}
{
  "error_code": "invalid_form_response",
  "message": "Field 'preferred_date' must be an ISO date (YYYY-MM-DD).",
  "retryable": true,
  "hint": "Review pending_form.requested_schema via get_request and resubmit valid answers."
}
```

* Check `retryable` and `hint` to decide whether the agent can self-correct automatically or should surface the message to the end user.
* For `create_request`, always reuse the same `idempotency_key` when retrying after a network timeout or `5xx` error.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.