{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/buildworkpro-com/json-schema/buildworkpro-com-lead-schema.json",
  "title": "Lead",
  "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/Lead",
  "type": "object",
  "properties": {
    "id": {
      "type": "integer"
    },
    "name": {
      "type": "string"
    },
    "contactId": {
      "type": [
        "integer",
        "null"
      ]
    },
    "stageId": {
      "type": "integer"
    },
    "assignedTo": {
      "type": [
        "integer",
        "null"
      ]
    },
    "source": {
      "type": [
        "string",
        "null"
      ]
    },
    "projectType": {
      "type": [
        "string",
        "null"
      ]
    },
    "estimatedValue": {
      "type": [
        "string",
        "null"
      ]
    },
    "probability": {
      "type": [
        "integer",
        "null"
      ]
    },
    "expectedCloseDate": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "description": {
      "type": [
        "string",
        "null"
      ]
    },
    "siteAddress": {
      "type": [
        "string",
        "null"
      ]
    },
    "siteCity": {
      "type": [
        "string",
        "null"
      ]
    },
    "siteState": {
      "type": [
        "string",
        "null"
      ]
    },
    "siteZipCode": {
      "type": [
        "string",
        "null"
      ]
    },
    "createdAt": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "string"
        }
      ]
    },
    "updatedAt": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "string"
        }
      ]
    }
  },
  "required": [
    "id",
    "name",
    "contactId",
    "stageId",
    "assignedTo",
    "source",
    "projectType",
    "estimatedValue",
    "probability",
    "expectedCloseDate",
    "description",
    "createdAt",
    "updatedAt"
  ]
}