{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/1clickwebsite-ai/json-schema/1clickwebsite-ai-site-create-request-schema.json",
  "title": "SiteCreateRequest",
  "x-generated": "2026-10-31",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/1clickwebsite-ai-openapi.json#/components/schemas/SiteCreateRequest",
  "type": "object",
  "required": [
    "templateId",
    "businessName"
  ],
  "properties": {
    "templateId": {
      "type": "string",
      "description": "Template ID returned by `GET /api/templates`."
    },
    "themeId": {
      "type": "string",
      "description": "Optional theme ID returned by `GET /api/templates`."
    },
    "builderVersion": {
      "type": "string",
      "enum": [
        "v2"
      ],
      "default": "v2"
    },
    "businessName": {
      "type": "string",
      "minLength": 1
    },
    "primaryLanguage": {
      "type": "string",
      "enum": [
        "en",
        "es",
        "fr",
        "de",
        "it",
        "ro",
        "tr"
      ],
      "default": "en"
    },
    "industry": {
      "type": "string"
    },
    "email": {
      "type": "string",
      "format": "email"
    },
    "phone": {
      "type": "string"
    },
    "address": {
      "type": "string",
      "description": "Legacy combined public address. Supported for compatibility; structured fields are preferred."
    },
    "addressLine1": {
      "type": "string",
      "description": "Public street address. Omit when `hasPublicBusinessAddress` is false."
    },
    "addressLine2": {
      "type": "string",
      "description": "Optional suite, unit, building, or floor."
    },
    "addressCity": {
      "type": "string",
      "description": "City or locality. May be supplied without a street address for service-area or online businesses."
    },
    "addressRegion": {
      "type": "string",
      "description": "State, province, or region."
    },
    "addressPostalCode": {
      "type": "string",
      "description": "Postal code. Omit when `hasPublicBusinessAddress` is false."
    },
    "countryCode": {
      "type": "string",
      "pattern": "^[A-Za-z]{2}$",
      "default": "US",
      "description": "Two-letter ISO country code."
    },
    "hasPublicBusinessAddress": {
      "type": "boolean",
      "default": true,
      "description": "When false, the street address and postal code are discarded and do not appear on the generated site. City, region, and country may still anchor service-area content."
    },
    "googlePlaceId": {
      "type": "string"
    },
    "businessWebsite": {
      "type": "string",
      "format": "uri"
    },
    "aboutBusiness": {
      "type": "string"
    },
    "businessHoursMode": {
      "type": "string",
      "enum": [
        "weekly",
        "open_24_hours",
        "do_not_display"
      ],
      "description": "Display behavior for the main business hours. If omitted, a supplied businessHours value implies weekly; otherwise hours are hidden."
    },
    "businessHours": {
      "type": "string",
      "description": "Weekly schedule as a JSON-encoded string or supported plain text. Used only with businessHoursMode=weekly."
    },
    "customerModel": {
      "type": "string",
      "enum": [
        "visit_business",
        "travel_to_customers",
        "hybrid",
        "remote_online"
      ],
      "default": "travel_to_customers",
      "description": "How customers interact with the business. visit_business and hybrid require hasPublicBusinessAddress=true."
    },
    "services": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "serviceAreas": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "locations": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "name"
        ],
        "properties": {
          "name": {
            "type": "string"
          },
          "address": {
            "type": "string"
          },
          "phone": {
            "type": "string"
          },
          "email": {
            "type": "string",
            "format": "email"
          },
          "hours": {
            "type": "string",
            "description": "Weekly schedule as a JSON-encoded string or supported plain text."
          },
          "hoursMode": {
            "type": "string",
            "enum": [
              "weekly",
              "open_24_hours",
              "do_not_display"
            ],
            "description": "Display behavior for this location's hours."
          },
          "mapUrl": {
            "type": "string",
            "format": "uri"
          },
          "description": {
            "type": "string"
          },
          "content": {
            "type": "string"
          }
        },
        "additionalProperties": false
      }
    },
    "logoUrl": {
      "type": "string",
      "format": "uri"
    },
    "skipImages": {
      "type": "boolean"
    },
    "createServicePages": {
      "type": "boolean",
      "default": true
    },
    "createServiceAreaPages": {
      "type": "boolean",
      "default": true
    },
    "createLocationPages": {
      "type": "boolean",
      "default": true
    },
    "primaryColor": {
      "type": "string",
      "pattern": "^#[0-9A-Fa-f]{6}$"
    },
    "secondaryColor": {
      "type": "string",
      "pattern": "^#[0-9A-Fa-f]{6}$"
    },
    "backgroundTheme": {
      "type": "string",
      "enum": [
        "light",
        "dark"
      ]
    },
    "headingFont": {
      "type": "string"
    },
    "bodyFont": {
      "type": "string"
    }
  },
  "additionalProperties": true
}