{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/qr-manager-ai/json-schema/qr-manager-ai-update-qr-code-body-schema.json",
  "title": "UpdateQrCodeBody",
  "description": "All fields are optional. Pass `null` to clear a nullable field.",
  "x-generated": "2026-11-22",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/qr-manager-ai-openapi.yml#/components/schemas/UpdateQrCodeBody",
  "type": "object",
  "properties": {
    "title": {
      "type": [
        "string",
        "null"
      ]
    },
    "fgColor": {
      "type": "string",
      "pattern": "^#[0-9a-fA-F]{6}$"
    },
    "bgColor": {
      "type": "string",
      "pattern": "^#[0-9a-fA-F]{6}$"
    },
    "dotStyle": {
      "$ref": "#/$defs/DotStyle"
    },
    "cornerStyle": {
      "$ref": "#/$defs/CornerStyle"
    },
    "cornerDotType": {
      "$ref": "#/$defs/CornerDotType"
    },
    "eyeOuterColor": {
      "type": [
        "string",
        "null"
      ],
      "pattern": "^#[0-9a-fA-F]{6}$",
      "description": "Hex colour for the eye outer squares. Pass `null` to clear."
    },
    "eyeInnerColor": {
      "type": [
        "string",
        "null"
      ],
      "pattern": "^#[0-9a-fA-F]{6}$",
      "description": "Hex colour for the eye inner dots. Pass `null` to clear."
    },
    "gradientType": {
      "$ref": "#/$defs/GradientType",
      "nullable": true,
      "description": "Gradient direction. Pass `null` to remove the gradient (also clears `gradientEndColor`)."
    },
    "gradientEndColor": {
      "type": [
        "string",
        "null"
      ],
      "pattern": "^#[0-9a-fA-F]{6}$",
      "description": "Second gradient colour. Pass `null` to clear."
    },
    "errorCorrectionLevel": {
      "$ref": "#/$defs/ErrorCorrectionLevel"
    },
    "logoSize": {
      "type": [
        "number",
        "null"
      ],
      "minimum": 0.1,
      "maximum": 0.4,
      "description": "Logo size fraction (0.1–0.4). Pass `null` to reset to default."
    },
    "logoMargin": {
      "type": [
        "integer",
        "null"
      ],
      "minimum": 0,
      "maximum": 20,
      "description": "Logo padding (px). Pass `null` to reset to default."
    },
    "frameStyle": {
      "type": [
        "integer",
        "null"
      ],
      "minimum": 1,
      "maximum": 16,
      "description": "Frame template (1–16). Pass `null` to remove the frame (also clears `frameColor` and `frameText`)."
    },
    "frameColor": {
      "type": [
        "string",
        "null"
      ],
      "pattern": "^#[0-9a-fA-F]{6}$",
      "description": "Frame colour. Pass `null` to clear."
    },
    "frameText": {
      "type": [
        "string",
        "null"
      ],
      "description": "Frame label text (max 50 chars). Pass `null` to clear."
    },
    "qrShape": {
      "$ref": "#/$defs/QrShape"
    },
    "roundSize": {
      "type": "boolean",
      "description": "Smooth dot edges."
    },
    "hideBackgroundDots": {
      "type": "boolean",
      "description": "Hide QR dots behind the logo area."
    },
    "bgRound": {
      "type": [
        "number",
        "null"
      ],
      "minimum": 0,
      "maximum": 1,
      "description": "Background corner rounding (0–1). Pass `null` to reset to default."
    },
    "outerMargin": {
      "type": [
        "integer",
        "null"
      ],
      "minimum": 0,
      "maximum": 40,
      "description": "Outer whitespace (px). Pass `null` to reset to default."
    },
    "maxScans": {
      "type": [
        "integer",
        "null"
      ],
      "minimum": 1
    },
    "expiresAt": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "folder": {
      "type": [
        "string",
        "null"
      ],
      "description": "Folder name. Pass `null` to move the QR code out of any folder."
    },
    "redirectUrl": {
      "type": "string",
      "description": "**URL and SHORTLINK types.** New redirect destination."
    },
    "utmSource": {
      "type": [
        "string",
        "null"
      ]
    },
    "utmMedium": {
      "type": [
        "string",
        "null"
      ]
    },
    "utmCampaign": {
      "type": [
        "string",
        "null"
      ]
    },
    "vcardName": {
      "type": "string"
    },
    "vcardOrg": {
      "type": "string"
    },
    "vcardPhone": {
      "type": "string"
    },
    "vcardEmail": {
      "type": "string"
    },
    "vcardUrl": {
      "type": "string"
    },
    "vcardAddress": {
      "type": "string"
    },
    "wifiSsid": {
      "type": "string"
    },
    "wifiPassword": {
      "type": "string"
    },
    "wifiSecurity": {
      "type": "string",
      "enum": [
        "WPA",
        "WEP",
        "nopass"
      ]
    },
    "smsPhone": {
      "type": "string"
    },
    "smsMessage": {
      "type": "string"
    },
    "emailTo": {
      "type": "string"
    },
    "emailSubject": {
      "type": "string"
    },
    "emailBody": {
      "type": "string"
    },
    "phone": {
      "type": "string"
    }
  },
  "$defs": {
    "CornerDotType": {
      "type": "string",
      "enum": [
        "square",
        "extra-rounded",
        "dot",
        "dots",
        "rounded",
        "classy",
        "classy-rounded"
      ],
      "default": "square",
      "description": "Style of the QR code corner finder inner dots."
    },
    "CornerStyle": {
      "type": "string",
      "enum": [
        "square",
        "extra-rounded",
        "dot",
        "dots",
        "rounded",
        "classy",
        "classy-rounded"
      ],
      "default": "square",
      "description": "Style of the QR code corner finder (eye outer) squares."
    },
    "DotStyle": {
      "type": "string",
      "enum": [
        "square",
        "dots",
        "rounded",
        "extra-rounded",
        "classy",
        "classy-rounded"
      ],
      "default": "square",
      "description": "Style of the QR code dot modules."
    },
    "ErrorCorrectionLevel": {
      "type": "string",
      "enum": [
        "L",
        "M",
        "Q",
        "H"
      ],
      "default": "M",
      "description": "Error correction capacity.\n- `L` — ~7% of codewords can be restored\n- `M` — ~15% (default)\n- `Q` — ~25%\n- `H` — ~30% (allows large logos)\n"
    },
    "GradientType": {
      "type": "string",
      "enum": [
        "linear",
        "upDown",
        "diagonal1",
        "diagonal2",
        "radial"
      ],
      "description": "Gradient direction applied to the dot modules. Requires `gradientEndColor`."
    },
    "QrShape": {
      "type": "string",
      "enum": [
        "square",
        "circle"
      ],
      "default": "square",
      "description": "Overall shape of the QR code — `square` (standard) or `circle` (circular)."
    }
  }
}