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

# Router Config Validation API

> Validate a raw YAML or JSON configuration against the Aria Compute ROUTER schema. No configuration changes are made.

Use the Validate endpoint to check whether a proposed router configuration is well-formed before applying it. Submit either a raw YAML string or a JSON config object. The endpoint returns a boolean validity flag and a list of schema errors with paths, if any. No live configuration is modified.

This is useful in CI pipelines and admin dashboards to prevent invalid config rollouts.

## Endpoint

```http theme={null}
POST /v1/router/validate
```

## Authentication

Authenticate with a session cookie or pass `Authorization: Bearer <api-key>`.

## Request Body

<ParamField body="config" type="string" required>
  Raw YAML v0.3 configuration string.
</ParamField>

Or

<ParamField body="config" type="object" required>
  JSON object matching the router config schema.
</ParamField>

## Response

<ResponseField name="valid" type="boolean">
  Whether the submitted configuration passes schema validation.
</ResponseField>

<ResponseField name="errors" type="array">
  List of validation errors. Empty when `valid` is true.

  <Expandable title="items">
    <ResponseField name="path" type="string">
      Dot-notation path to the invalid field.
    </ResponseField>

    <ResponseField name="message" type="string">
      Human-readable validation message.
    </ResponseField>
  </Expandable>
</ResponseField>

<RequestExample>
  ```bash cURL theme={null}
  curl -X POST "https://router.example.com/v1/router/validate" \
    -H "Authorization: Bearer <api-key>" \
    -H "Content-Type: application/json" \
    -d '{"config":"listeners:\n  - address: 0.0.0.0\n    port: 8080\nproviders: []\nentrypoints: []\nrecipes: []\nglobal: {}"}'
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "valid": false,
    "errors": [
      {
        "path": "providers",
        "message": "providers must be a non-empty array"
      }
    ]
  }
  ```
</ResponseExample>


## Related topics

- [Update Aria Compute ROUTER Email Address](/api-reference/router/auth/email.md)
- [Router Configuration Get and Update API](/api-reference/router/management/config.md)
- [aria-router runtime and FFI](/sdks/router-runtime.md)
- [Reroute Captured Router Request API](/api-reference/router/replay/reroute.md)
- [Create Evaluation](/api-reference/pin/evaluations/create.md)
