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

# Start Validation

> Trigger validation after S3 upload

Trigger validation after uploading a document via presigned URL.

## Request Body

<ParamField body="job_id" type="string" required>
  Job ID from the presigned URL response
</ParamField>

<ParamField body="document_category" type="string">
  Override document category from presigned URL request
</ParamField>

<ParamField body="document_metadata" type="object">
  Override document metadata from presigned URL request
</ParamField>

## Response

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

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

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

<ResponseField name="timestamp" type="string">
  ISO 8601 timestamp
</ResponseField>

<ResponseField name="document_size" type="integer">
  Size of the uploaded document in bytes
</ResponseField>

<ResponseField name="next_steps" type="object">
  Instructions for retrieving results
</ResponseField>

<ResponseExample>
  ```json 202 Accepted theme={null}
  {
    "job_id": "abc123def456",
    "status": "accepted",
    "message": "Validation request queued for processing",
    "timestamp": "2026-01-08T10:30:00Z",
    "document_size": 1048576,
    "next_steps": {
      "poll_results": "POST /api/validate_stream_result/ with {\"job_id\": \"abc123def456\"}"
    }
  }
  ```
</ResponseExample>

## Error Responses

| Status | Description                                    |
| ------ | ---------------------------------------------- |
| 400    | Missing job\_id or document\_category/metadata |
| 404    | Document not found in S3                       |
| 409    | Job already started or completed               |

## Example

<CodeGroup>
  ```bash cURL theme={null}
  curl -X POST "https://{api-url}/api/validate_stream_start/" \
    -H "x-api-key: YOUR_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
      "job_id": "abc123def456"
    }'
  ```

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

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

  response = requests.post(
      f"{API_BASE}/api/validate_stream_start/",
      headers={
          "x-api-key": API_KEY,
          "Content-Type": "application/json"
      },
      json={
          "job_id": "abc123def456"
      }
  )

  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_stream_start/`,
    {
      job_id: 'abc123def456'
    },
    {
      headers: {
        'x-api-key': API_KEY,
        'Content-Type': 'application/json'
      }
    }
  );

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