{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/compuute-se/json-schema/compuute-se-subscribe-request-schema.json",
  "title": "SubscribeRequest",
  "x-generated": "2026-10-29",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/leads-compuute-se-openapi.json#/components/schemas/SubscribeRequest",
  "properties": {
    "criteria": {
      "$ref": "#/$defs/SearchCriteria"
    },
    "webhook_url": {
      "type": "string",
      "maxLength": 2083,
      "minLength": 1,
      "format": "uri",
      "title": "Webhook Url"
    },
    "webhook_secret": {
      "type": "string",
      "minLength": 16,
      "title": "Webhook Secret",
      "description": "Shared secret for HMAC verification (min 16 chars)"
    },
    "frequency": {
      "type": "string",
      "title": "Frequency",
      "description": "hourly, daily, or weekly",
      "default": "daily"
    },
    "max_leads_per_delivery": {
      "type": "integer",
      "maximum": 100.0,
      "minimum": 1.0,
      "title": "Max Leads Per Delivery",
      "default": 25
    }
  },
  "type": "object",
  "required": [
    "criteria",
    "webhook_url",
    "webhook_secret"
  ],
  "$defs": {
    "Industry": {
      "type": "string",
      "enum": [
        "AI",
        "Blockchain",
        "Fintech",
        "Security",
        "Healthcare",
        "DevTools",
        "Other"
      ],
      "title": "Industry"
    },
    "Region": {
      "type": "string",
      "enum": [
        "EU",
        "US",
        "APAC",
        "MENA",
        "Other"
      ],
      "title": "Region"
    },
    "SearchCriteria": {
      "properties": {
        "industries": {
          "anyOf": [
            {
              "items": {
                "$ref": "#/$defs/Industry"
              },
              "type": "array"
            },
            {
              "type": "null"
            }
          ],
          "title": "Industries"
        },
        "stages": {
          "anyOf": [
            {
              "items": {
                "$ref": "#/$defs/Stage"
              },
              "type": "array"
            },
            {
              "type": "null"
            }
          ],
          "title": "Stages"
        },
        "regions": {
          "anyOf": [
            {
              "items": {
                "$ref": "#/$defs/Region"
              },
              "type": "array"
            },
            {
              "type": "null"
            }
          ],
          "title": "Regions"
        },
        "min_employees": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "title": "Min Employees"
        },
        "min_icp_score": {
          "type": "integer",
          "maximum": 100.0,
          "minimum": 0.0,
          "title": "Min Icp Score",
          "default": 0
        },
        "min_buying_intent": {
          "type": "integer",
          "maximum": 100.0,
          "minimum": 0.0,
          "title": "Min Buying Intent",
          "default": 0
        },
        "tech_stack_contains": {
          "anyOf": [
            {
              "items": {
                "type": "string"
              },
              "type": "array"
            },
            {
              "type": "null"
            }
          ],
          "title": "Tech Stack Contains"
        },
        "max_age_days": {
          "type": "integer",
          "maximum": 365.0,
          "minimum": 1.0,
          "title": "Max Age Days",
          "default": 30
        }
      },
      "type": "object",
      "title": "SearchCriteria"
    },
    "Stage": {
      "type": "string",
      "enum": [
        "Pre-seed",
        "Seed",
        "Series A",
        "Series B",
        "Series C+",
        "Public",
        "Unknown"
      ],
      "title": "Stage"
    }
  }
}