> ## Documentation Index
> Fetch the complete documentation index at: https://developer.plugchoice.com/llms.txt
> Use this file to discover all available pages before exploring further.

# validation-failed

> The request body or query doesn't pass validation.

| Status | Title |
| - | - |
| `422` | The request is invalid |

## Where you see it

* **Your server**, mostly on `POST /client-sessions` (its body) and `GET /chargers` (its query).
* **Your app's result**, when the hosted flow can't start because the action's ids are wrong: a `charger_id` that isn't a UUID, an action other than `add` without a charger, or a site with an action other than `add`.

## What it means

`errors` lists every field that failed, by path (`scope.chargers.0`), each with its messages. `detail` repeats the first message.

Two fields depend on the caller:

* `external_user_id` and `charger_reference` are for integrations only.
* `redirect_uri` must be on your integration's allow-list.

## What to do

* Fix the fields `errors` names, then send the request again.
* In your app, pass a `chargerId` to every action but `add`, and a `siteId` only with `add`.

## Example

```json theme={null}
{
  "type": "https://developer.plugchoice.com/sdk/errors/validation-failed",
  "title": "The request is invalid",
  "status": 422,
  "code": "validation-failed",
  "detail": "The scope.chargers.0 field must be a valid UUID.",
  "errors": {
    "scope.chargers.0": [
      "The scope.chargers.0 field must be a valid UUID."
    ]
  }
}
```


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