{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://aiexpert.ee/downloads/articles/lead-triage-intake.schema.json",
  "title": "Lead triage intake payload",
  "type": "object",
  "additionalProperties": false,
  "required": ["name", "email", "message", "source", "timestamp"],
  "properties": {
    "name": {
      "type": "string",
      "minLength": 1,
      "maxLength": 120
    },
    "email": {
      "type": "string",
      "format": "email",
      "maxLength": 254
    },
    "company": {
      "type": "string",
      "maxLength": 160
    },
    "role": {
      "type": "string",
      "maxLength": 120
    },
    "message": {
      "type": "string",
      "minLength": 1,
      "maxLength": 4000
    },
    "source": {
      "type": "string",
      "enum": ["website-form", "event", "crm", "manual-import", "partner-referral"]
    },
    "timestamp": {
      "type": "string",
      "format": "date-time"
    },
    "consent": {
      "type": "boolean"
    },
    "idempotencyKey": {
      "type": "string",
      "minLength": 8,
      "maxLength": 160
    }
  }
}
