{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/dotsy-ai/json-schema/dotsy-ai-set-account-onboarding-body-schema.json",
  "title": "SetAccountOnboardingBody",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/dotsy-ai-account-api-openapi.yml#/components/schemas/SetAccountOnboardingBody",
  "type": "object",
  "properties": {
    "buildingFor": {
      "type": [
        "string",
        "null"
      ],
      "enum": [
        "self",
        "clients",
        "exploring"
      ]
    },
    "startingFrom": {
      "type": [
        "string",
        "null"
      ],
      "enum": [
        "new",
        "existing"
      ]
    },
    "why": {
      "type": [
        "string",
        "null"
      ],
      "enum": [
        "ai",
        "price",
        "hosting",
        "moving",
        "other"
      ]
    },
    "whyNote": {
      "type": [
        "string",
        "null"
      ],
      "description": "Stored only when `why` is `other`. Trimmed, control characters removed, then at most 140 characters. `null` clears it."
    },
    "statedAi": {
      "type": [
        "string",
        "null"
      ],
      "enum": [
        "claude",
        "cursor",
        "chatgpt",
        "other",
        "none"
      ]
    },
    "welcome": {
      "type": "string",
      "enum": [
        "done",
        "skipped"
      ]
    },
    "buildAgentOptIn": {
      "type": "boolean"
    },
    "dismissed": {
      "type": "boolean",
      "enum": [
        true
      ]
    },
    "completed": {
      "type": "boolean",
      "enum": [
        true
      ]
    },
    "client": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "minLength": 1,
          "maxLength": 64
        },
        "version": {
          "type": "string",
          "maxLength": 32,
          "description": "Missing or blank is stored as null."
        }
      },
      "required": [
        "name"
      ]
    },
    "attribution": {
      "type": "object",
      "properties": {
        "referrer": {
          "type": [
            "string",
            "null"
          ],
          "maxLength": 256,
          "description": "Stored as origin and path. Not https is dropped."
        },
        "landing": {
          "type": [
            "string",
            "null"
          ],
          "maxLength": 256,
          "description": "Stored as origin and path. Not https is dropped."
        },
        "utm": {
          "type": "object",
          "properties": {
            "source": {
              "type": "string",
              "maxLength": 100
            },
            "medium": {
              "type": "string",
              "maxLength": 100
            },
            "campaign": {
              "type": "string",
              "maxLength": 100
            },
            "term": {
              "type": "string",
              "maxLength": 100
            },
            "content": {
              "type": "string",
              "maxLength": 100
            }
          },
          "additionalProperties": false
        }
      },
      "additionalProperties": false,
      "description": "Write-once. A second call leaves the first referrer, landing and utm in place."
    }
  },
  "additionalProperties": false
}