---
title: "Check a flows script without saving it (v2)"
method: POST
path: "/v2/agents/flows/validate"
tags: ["Agents"]
---

# Check a flows script without saving it (v2)

`POST /v2/agents/flows/validate`

## Request

- Base URL: `https://api.chat.ethora.com`
- URL: `https://api.chat.ethora.com/v2/agents/flows/validate`
- Auth: one of:
  - HTTP bearer
  - HTTP bearer

Runs the flows compiler on a YAML script and reports the result. Nothing
is stored. Supports `User JWT` and `B2B Server JWT`.

A script that does not compile is still a 200, with `ok: false` and
the errors (each with a 1-based `line` when it can be located).

## Request body

- object
  - `flowsYaml` string, required

## Response `200`

```
{ ok: true, flowKeys: string[] }
// or
{ ok: false, errors: [{ path: string, message: string, line?: number }] }
```

## Other responses

- `400`: `flowsYaml` missing or too long. ``` { error: string, code: 'VALIDATION_ERROR' } ```
- `401`: Unauthorized
- `403`: Forbidden
- `404`: Not Found
- `422`: Unprocessable Entity
- `500`: Internal Server Error

---

[API](https://skmtc.dev/ethora/apis/platform-api.md) · [All operations](https://skmtc.dev/ethora/apis/platform-api/llms.txt) · [OpenAPI document](https://skmtc.dev/ethora/apis/platform-api/revisions/01b6e64378ee?raw)
