{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/buildworkpro-com/json-schema/buildworkpro-com-create-lead-schema.json",
  "title": "CreateLead",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/buildworkpro-com-leads-api-openapi.yml#/components/schemas/CreateLead",
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "minLength": 1
    },
    "stageId": {
      "type": "integer"
    },
    "contactId": {
      "type": [
        "integer",
        "null"
      ]
    },
    "assignedTo": {
      "type": [
        "integer",
        "null"
      ]
    },
    "source": {
      "type": [
        "string",
        "null"
      ]
    },
    "projectType": {
      "type": [
        "string",
        "null"
      ],
      "enum": [
        "residential",
        "commercial",
        "industrial"
      ]
    },
    "estimatedValue": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "number"
        },
        {
          "type": "null"
        }
      ]
    },
    "probability": {
      "type": "integer",
      "minimum": 0,
      "maximum": 100
    },
    "expectedCloseDate": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "description": {
      "type": [
        "string",
        "null"
      ]
    },
    "siteAddress": {
      "type": [
        "string",
        "null"
      ]
    },
    "siteCity": {
      "type": [
        "string",
        "null"
      ],
      "maxLength": 255
    },
    "siteState": {
      "type": [
        "string",
        "null"
      ],
      "maxLength": 100
    },
    "siteZipCode": {
      "type": [
        "string",
        "null"
      ],
      "maxLength": 20
    }
  },
  "required": [
    "name",
    "stageId"
  ]
}