---
title: "Validate Blocked Words File"
method: POST
path: "/guardrails/validate_blocked_words_file"
tags: ["Guardrails"]
---

# Validate Blocked Words File

`POST /guardrails/validate_blocked_words_file`

Validate a blocked_words YAML file content.

Args:
    request: Dictionary with 'file_content' key containing the YAML string

Returns:
    Dictionary with 'valid' boolean and either 'message'/'errors' depending on result

Example Request:
```json
{
    "file_content": "blocked_words:\n  - keyword: \"test\"\n    action: \"BLOCK\""
}
```

Example Success Response:
```json
{
    "valid": true,
    "message": "Valid YAML file with 2 blocked words"
}
```

Example Error Response:
```json
{
    "valid": false,
    "errors": ["Entry 0: missing 'action' field"]
}
```

## Request body

- object

## Response `200`

Successful Response

- unknown

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/sea-lion/apis/litellm-api.md) · [All operations](https://skmtc.net/sea-lion/apis/litellm-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/sea-lion/litellm-api/revisions/79928a3d37d3/schema)
