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

# Handler for POST /api/v1/validate

> Validates a typed query IR without executing reasoning. **Required scope:** write

Validates a typed query IR without executing reasoning.

**Required scope:** `write`

### Request body

`ValidateRequest`

<ParamField body="ir" type="object" />

<ParamField body="query" type="string" />

<ParamField body="strict" type="boolean" />

### Response

`ValidateResponse`

<ResponseField name="errors" type="ValidationIssue[]" required>
  <Expandable title="ValidationIssue">
    <ResponseField name="code" type="string" required />

    <ResponseField name="message" type="string" required />

    <ResponseField name="path" type="string" />
  </Expandable>
</ResponseField>

<ResponseField name="ir" type="object" />

<ResponseField name="plan" type="object" />

<ResponseField name="valid" type="boolean" required />

<ResponseField name="warnings" type="ValidationIssue[]" required>
  <Expandable title="ValidationIssue">
    <ResponseField name="code" type="string" required />

    <ResponseField name="message" type="string" required />

    <ResponseField name="path" type="string" />
  </Expandable>
</ResponseField>

### Status codes

| Code  | Meaning                                            |
| ----- | -------------------------------------------------- |
| `200` | Validation finished                                |
| `400` | Invalid request payload                            |
| `401` | Unauthorized — missing or invalid credentials      |
| `403` | Forbidden — the key/token lacks the required scope |
| `429` | Rate limited — see Retry-After / X-RateLimit-Reset |

<RequestExample>
  ```bash cURL theme={null}
  curl --request POST \
    --url 'https://api.nsr.stateset.com/api/v1/validate' \
    --header 'X-API-Key: YOUR_API_KEY' \
    --header 'Content-Type: application/json' \
    --data '{
    "ir": null,
    "query": "string",
    "strict": true
  }'
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "errors": [
      {
        "code": "string",
        "message": "Two-person tent, green — replacement for damaged pole set.",
        "path": "string"
      }
    ],
    "ir": null,
    "plan": null,
    "valid": true,
    "warnings": [
      {
        "code": "string",
        "message": "Two-person tent, green — replacement for damaged pole set.",
        "path": "string"
      }
    ]
  }
  ```
</ResponseExample>
