# PUBLIC_REQUEST_VALIDATION_FAILED: Request does not match the endpoint schema.

- Category: Public API
- HTTP status: 422
- Reference: https://docs.bizkithub.com/en/errors/PUBLIC_REQUEST_VALIDATION_FAILED

## What happened

The body, query or path parameters failed schema validation. The response lists the offending fields in `errors` (`path` + `message`) and the request part in `on` (`body`, `query`, `params`). The schema of every endpoint is in the Swagger documentation.

## How to resolve

1. Send `Content-Type: application/json` with a JSON object body.
2. Omit optional fields or send `null` where the schema allows it.

## Example response

```json
{
  "state": "error",
  "code": 422,
  "message": "Request does not match the endpoint schema.",
  "errorCode": "PUBLIC_REQUEST_VALIDATION_FAILED",
  "hint": "The body, query or path parameters failed schema validation. The response lists the offending fields in `errors` (`path` + `message`) and the request part in `on` (`body`, `query`, `params`). The schema of every endpoint is in the Swagger documentation.",
  "documentationUrl": "https://docs.bizkithub.com/errors/PUBLIC_REQUEST_VALIDATION_FAILED"
}
```
