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

# Validate Text Snippet

> Submit a text snippet for validation

Submit a plain text snippet for asynchronous compliance validation.

## Request Body

<ParamField body="text_snippet" type="string" required>
  Plain text content to validate
</ParamField>

<ParamField body="document_category" type="string">
  Optional document category. If omitted, all rule packs will run.

  Options: `retail_investor_letter`, `retail_fact_sheet_registered_fund`, `retail_fact_sheet_non_registered`, `pitch_book_registered_fund`, `pitch_book_non_registered`, `scenario_retail_investor_letter`, `scenario_retail_fact_sheet_registered_fund`, `scenario_retail_fact_sheet_non_registered`, `scenario_pitch_book_registered_fund`, `scenario_pitch_book_non_registered`
</ParamField>

<ParamField body="document_metadata" type="object">
  Optional detailed metadata for precise rule matching.
</ParamField>

## Response

<ResponseField name="job_id" type="string">
  Unique identifier for the validation job
</ResponseField>

<ResponseField name="status" type="string">
  Job status: `accepted`
</ResponseField>

<ResponseExample>
  ```json 202 Accepted theme={null}
  {
    "job_id": "snippet_789xyz",
    "status": "accepted"
  }
  ```
</ResponseExample>

## Example

<CodeGroup>
  ```bash cURL theme={null}
  curl -X POST "https://{api-url}/api/validate_snippet_stream/" \
    -H "x-api-key: YOUR_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
      "text_snippet": "Our fund guarantees 20% returns with zero risk!",
      "document_category": "retail_investor_letter"
    }'
  ```

  ```python Python theme={null}
  import requests

  API_KEY = "YOUR_API_KEY"
  API_BASE = "https://{api-url}"

  response = requests.post(
      f"{API_BASE}/api/validate_snippet_stream/",
      headers={
          "x-api-key": API_KEY,
          "Content-Type": "application/json"
      },
      json={
          "text_snippet": "Our fund guarantees 20% returns with zero risk!",
          "document_category": "retail_investor_letter"
      }
  )

  print(response.json())
  ```

  ```javascript JavaScript theme={null}
  const axios = require('axios');

  const API_KEY = 'YOUR_API_KEY';
  const API_BASE = 'https://{api-url}';

  const response = await axios.post(
    `${API_BASE}/api/validate_snippet_stream/`,
    {
      text_snippet: 'Our fund guarantees 20% returns with zero risk!',
      document_category: 'retail_investor_letter'
    },
    {
      headers: {
        'x-api-key': API_KEY,
        'Content-Type': 'application/json'
      }
    }
  );

  console.log(response.data);
  ```
</CodeGroup>
