{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://varexis.tech/varexis-index/request-schema.json",
  "title": "VAREXIS-INDEX launch-phase email request",
  "description": "An email handoff format, not an HTTP API. Do not include credentials, payment-card data or protected evidence.",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "service_id",
    "question",
    "record_ids",
    "output_format"
  ],
  "properties": {
    "service_id": {
      "type": "string",
      "enum": [
        "single_request",
        "evidence_receipt",
        "research_subscription",
        "developer_api"
      ]
    },
    "question": {
      "type": "string",
      "minLength": 10,
      "maxLength": 2000
    },
    "proposed_claim": {
      "type": "string",
      "minLength": 1,
      "maxLength": 2000
    },
    "record_ids": {
      "type": "array",
      "minItems": 1,
      "maxItems": 20,
      "uniqueItems": true,
      "items": {
        "type": "string",
        "pattern": "^VXI-[A-Za-z0-9-]+$"
      }
    },
    "intended_use": {
      "type": "string",
      "maxLength": 1000
    },
    "output_format": {
      "type": "string",
      "enum": [
        "json",
        "text"
      ]
    },
    "payment_reference": {
      "type": "string",
      "maxLength": 200,
      "description": "Optional receipt reference only. An operator verifies the payment separately."
    }
  }
}
