> ## 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 Email

> Submit email content for validation against all rule packs

Submit email content for asynchronous compliance validation. This endpoint validates against all rule packs.

## Request Body

<ParamField body="text_snippet" type="string" required>
  Email content to validate
</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": "email_abc123",
    "status": "accepted"
  }
  ```
</ResponseExample>

## Example

<CodeGroup>
  ```bash cURL theme={null}
  curl -X POST "https://{api-url}/api/validate_email/" \
    -H "x-api-key: YOUR_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
      "text_snippet": "Dear Investor,\n\nI am excited to share that our fund has achieved exceptional returns..."
    }'
  ```

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

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

  response = requests.post(
      f"{API_BASE}/api/validate_email/",
      headers={
          "x-api-key": API_KEY,
          "Content-Type": "application/json"
      },
      json={
          "text_snippet": "Dear Investor,\n\nI am excited to share that our fund has achieved exceptional returns..."
      }
  )

  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_email/`,
    {
      text_snippet: 'Dear Investor,\n\nI am excited to share that our fund has achieved exceptional returns...'
    },
    {
      headers: {
        'x-api-key': API_KEY,
        'Content-Type': 'application/json'
      }
    }
  );

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