{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/unlocksaas-com/json-schema/unlocksaas-com-diagnostic-request-schema.json",
  "title": "DiagnosticRequest",
  "x-generated": "2026-11-27",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/unlocksaas-com-openapi.json#/components/schemas/DiagnosticRequest",
  "type": "object",
  "required": [
    "email",
    "productUrl"
  ],
  "properties": {
    "email": {
      "type": "string",
      "format": "email",
      "description": "The user's real email. The diagnosis id is bound to this address and the follow-up sequence is delivered here. MX deliverability is checked server-side; typo'd domains 400."
    },
    "productUrl": {
      "type": "string",
      "format": "uri",
      "description": "The live SaaS landing-page URL to diagnose. Must be a real https URL the engine can fetch within 8 s. The alias `url` is also accepted for backward compatibility."
    },
    "url": {
      "type": "string",
      "format": "uri",
      "description": "Alias for productUrl (legacy v1 callers). Prefer productUrl."
    },
    "source": {
      "type": "string",
      "description": "Free-text attribution tag. Set to 'chatgpt-plugin' when calling from a ChatGPT Custom GPT so the lead is attributed to the GPT channel."
    },
    "referrer": {
      "type": "string",
      "description": "Optional referrer URL. Used to attribute the lead source when source is not provided."
    },
    "survey": {
      "$ref": "#/$defs/BrunsonSurvey",
      "description": "Optional Brunson Survey Funnel answers (DCS Secret 15). Improves the bucket assignment that drives downstream segmentation. Safe to omit."
    }
  },
  "additionalProperties": false,
  "$defs": {
    "BrunsonSurvey": {
      "type": "object",
      "required": [
        "time_since_launch",
        "recent_revenue",
        "biggest_attempt"
      ],
      "properties": {
        "time_since_launch": {
          "type": "string",
          "enum": [
            "under_30",
            "30_to_90",
            "90_plus"
          ],
          "description": "Days since the product first went live. under_30 = less than 30 days; 30_to_90 = 30 to 90 days; 90_plus = more than 90 days."
        },
        "recent_revenue": {
          "type": "string",
          "enum": [
            "zero",
            "under_100",
            "100_to_1k",
            "over_1k"
          ],
          "description": "Revenue earned in the last 30 days (USD). zero = no revenue; under_100 = $1–$99; 100_to_1k = $100–$999; over_1k = $1,000 or more."
        },
        "biggest_attempt": {
          "type": "string",
          "enum": [
            "more_building",
            "seo_content",
            "paid_ads",
            "customer_conversations",
            "nothing_yet"
          ],
          "description": "The single biggest go-to-market lever the founder has tried so far. more_building = kept iterating on the product; seo_content = blog posts / programmatic SEO; paid_ads = paid acquisition; customer_conclusions = etc."
        }
      }
    }
  }
}