# validation_failed

The request did not pass validation.

## What it means

The body was read, but a field is missing, has the wrong type, or has a value we do not accept. `error.message` lists each field and what is wrong with it.

## Why it happens

- A required field is missing or misspelled (`origin_url`, not `originUrl`).
- A value is out of range: `limit` above 100, `metadata` above 4 KB, an unknown `mode` or `apex_redirect`.
- An action does not apply in the current state, for example `POST /verify` on a test domain or on a domain that is rate-limited by the certificate authority.

## What to do

1. Read `error.message`: it names the field.
2. Compare the body with the [OpenAPI document](https://api.apexly.dev/v1/openapi.json).
3. Unknown fields in a domain body are rejected rather than ignored, so a typo is caught here.

- [Open the dashboard](/app/domains)
- [All limits](/docs/limits-and-pricing)

## In the API

```
HTTP 422

{
  "error": {
    "code": "validation_failed",
    "message": "The request did not pass validation.",
    "fix": "Correct the fields listed in the message and try again.",
    "docs": "https://apexly.dev/docs/errors/validation_failed"
  }
}
```
