Skip to main content
POST
/
api
/
validate_stream
Validate Document
curl --request POST \
  --url https://api.example.com/api/validate_stream/ \
  --header 'Content-Type: application/json' \
  --data '
{
  "document_bytes": "<string>",
  "document_category": "<string>",
  "document_metadata": {
    "audience_hint": "<string>",
    "jurisdiction": "<string>",
    "product_class": "<string>",
    "document_type": "<string>",
    "product_types": [
      {}
    ]
  }
}
'
{
  "job_id": "abc123def456",
  "status": "accepted",
  "message": "Validation request queued for processing",
  "timestamp": "2026-01-08T10:30:00Z"
}
Submit a base64-encoded document for asynchronous compliance validation.

Request Body

document_bytes
string
required
Base64-encoded document content (PDF, DOCX, etc.)
document_category
string
Pre-defined category for the document. Required if document_metadata is not provided.Options: retail_investor_letter, retail_fact_sheet_registered_fund, retail_fact_sheet_non_registered, pitch_book_registered_fund, pitch_book_non_registered
document_metadata
object
Detailed metadata for precise rule matching. Required if document_category is not provided.
At least one of document_category or document_metadata must be provided.

Response

job_id
string
Unique identifier for the validation job
status
string
Job status: accepted
message
string
Status message
timestamp
string
ISO 8601 timestamp
{
  "job_id": "abc123def456",
  "status": "accepted",
  "message": "Validation request queued for processing",
  "timestamp": "2026-01-08T10:30:00Z"
}

Example

# Encode document to base64
DOC_BASE64=$(base64 -i document.pdf)

curl -X POST "https://zhshgjat2b.execute-api.us-east-1.amazonaws.com/dev/v1/api/validate_stream/" \
  -H "x-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d "{
    \"document_bytes\": \"$DOC_BASE64\",
    \"document_category\": \"retail_investor_letter\"
  }"