> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.cadrooms.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.cadrooms.com/_mcp/server.

# Errors

The CAD ROOMS API uses standard HTTP status codes to indicate the outcome of a request.

* **2xx Success:** The request was processed successfully.
* **3xx Redirect:** The requested resource is available at another URL.
* **4xx Client error:** The request failed due to a client-side issue, such as a missing parameter or an invalid API key.
* **5xx Server error:** An unexpected error occurred on the CAD ROOMS server.

When a request fails, the API returns a structured error response containing a stable error code, a human-readable message, and a request ID for troubleshooting.

## HTTP status codes

* **`200` OK:** The request succeeded.
* **`201` Created:** A new resource was created successfully.
* **`204` No Content:** The request succeeded without returning a response body, typically after deleting a resource.
* **`302` Found:** The requested download is available at the URL specified in the `Location` header.
* **`400` Bad Request:** The request contains invalid or missing parameters.
* **`401` Unauthorized:** The API key or session token is missing, invalid, expired, or revoked.
* **`403` Forbidden:** The workspace plan does not support the requested feature.
* **`404` Not Found:** The requested resource does not exist or is not accessible to your account.
* **`429` Too Many Requests:** The API rate limit has been exceeded. Wait for the duration specified in the `Retry-After` header before retrying.
* **`500` Internal Server Error:** An unexpected server error occurred. Retry the request later.

## Error codes

All endpoints can return the general error codes listed below. Endpoints may also return more specific error codes for particular business conditions. These codes are documented in the corresponding endpoint reference.

* **`VALIDATION_FAILED`** (`400`): The request contains invalid or missing parameters. See `error.details`.
* **`UNAUTHENTICATED`** (`401`): The API key or session token is missing, invalid, expired, or revoked.
* **`PLAN_REQUIRED`** (`403`): The workspace plan does not support the requested feature.
* **`NOT_FOUND`** (`404`): The requested resource does not exist or is not accessible to your account.
* **`RATE_LIMITED`** (`429`): The API rate limit has been exceeded. Wait for the duration specified in the `Retry-After` header before retrying.
* **`INTERNAL_ERROR`** (`500`): An unexpected server error occurred. Retry the request later.

**Recommendation:** Use the `code` field rather than relying solely on the HTTP status code when handling specific error conditions.

## Error response format

All API errors return a JSON object containing an `error` field.

Example response:

```json
{
  "error": {
    "code": "PLAN_REQUIRED",
    "message": "ECOs need the Business plan.",
    "requestId": "7f3c9d2e-1a4b-4c6d-9e8f-0a1b2c3d4e5f"
  }
}
```

### Response fields

* **`error`** (object): Contains information about the failed request.
* **`error.code`** (string): A stable error identifier for programmatic error handling. See [Error codes](#error-codes).
* **`error.message`** (string): A human-readable description of the error. This may change over time.
* **`error.requestId`** (string): A unique request identifier used for troubleshooting. Include this value when contacting CAD ROOMS support.
* **`error.details`** (array): Optional. Contains field-level validation errors for `400 Bad Request` responses.

## Request IDs

Every API response, including successful responses, includes a `Request-Id` header.

For error responses, the same identifier is also available in `error.requestId`.

Include this identifier when contacting CAD ROOMS support to help locate the request during troubleshooting.

**Important:** Error messages may change without an API version change. Use `error.code` rather than `error.message` in your application logic.

## Validation errors

When a request contains invalid or missing parameters, the API returns:

* **HTTP status:** `400 Bad Request`
* **Error code:** `VALIDATION_FAILED`

Validation errors include a `details` array containing information about the fields that failed validation.

Each entry contains:

* **`field`** (string): The name of the request field that failed validation.
* **`message`** (string): A description of the validation issue.

Example response:

```json
{
  "error": {
    "code": "VALIDATION_FAILED",
    "message": "The request is not valid.",
    "requestId": "7f3c9d2e-1a4b-4c6d-9e8f-0a1b2c3d4e5f",
    "details": [
      {
        "field": "url",
        "message": "Must start with https://."
      }
    ]
  }
}
```

Use the `details` array to identify and correct invalid fields before retrying the request.