{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/formasty-com/json-schema/formasty-com-form-response-schema.json",
  "title": "FormResponse",
  "x-generated": "2026-11-08",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/formasty-com-openapi.json#/components/schemas/FormResponse",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "data",
    "draft_schema",
    "settings",
    "published_schema"
  ],
  "properties": {
    "data": {
      "$ref": "#/$defs/FormSummary"
    },
    "draft_schema": {
      "$ref": "#/$defs/DraftSchema"
    },
    "settings": {
      "type": "object",
      "additionalProperties": true,
      "description": "Complete operational settings for the current draft. Send this snapshot with draft_schema when changing both."
    },
    "published_schema": {
      "oneOf": [
        {
          "$ref": "#/$defs/DraftSchema"
        },
        {
          "type": "null"
        }
      ]
    },
    "draft_revision": {
      "type": "integer",
      "minimum": 0
    },
    "public_url": {
      "type": "string"
    }
  },
  "$defs": {
    "DraftSchema": {
      "type": "object",
      "properties": {
        "version": {
          "type": "integer",
          "enum": [
            1
          ],
          "description": "Current builder schema version."
        },
        "steps": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "description": "Stable step id. Supply one only when you need a caller-controlled id; otherwise Formasty can generate it."
              },
              "title": {
                "type": "string"
              },
              "backButtonLabel": {
                "type": "string"
              },
              "nextButtonLabel": {
                "type": "string"
              },
              "welcomeOverline": {
                "type": "string"
              },
              "showWelcomeStepInfo": {
                "type": "boolean"
              },
              "showWelcomeQuestionCount": {
                "type": "boolean"
              },
              "showWelcomeTimeEstimate": {
                "type": "boolean"
              },
              "welcomeIcon": {
                "type": "string",
                "enum": [
                  "none",
                  "sparkles",
                  "rocket",
                  "gem",
                  "heart_handshake",
                  "briefcase_business",
                  "building_2",
                  "store",
                  "landmark",
                  "globe_2",
                  "shield_check",
                  "graduation_cap"
                ]
              },
              "welcomeIconCustomUrl": {
                "type": "string",
                "description": "Absolute URL string. Prefer https URLs for public assets and integrations."
              },
              "coverImageUrl": {
                "type": "string",
                "description": "Absolute URL string. Prefer https URLs for public assets and integrations."
              },
              "coverImageAttribution": {
                "type": "object",
                "properties": {
                  "provider": {
                    "type": "string",
                    "enum": [
                      "unsplash"
                    ]
                  },
                  "photographerName": {
                    "type": "string"
                  },
                  "photographerUrl": {
                    "type": "string",
                    "description": "Absolute URL string. Prefer https URLs for public assets and integrations."
                  },
                  "sourceName": {
                    "type": "string",
                    "enum": [
                      "Unsplash"
                    ]
                  },
                  "sourceUrl": {
                    "type": "string",
                    "description": "Absolute URL string. Prefer https URLs for public assets and integrations."
                  },
                  "photoUrl": {
                    "type": "string",
                    "description": "Absolute URL string. Prefer https URLs for public assets and integrations."
                  }
                },
                "required": [
                  "provider",
                  "photographerName",
                  "photographerUrl",
                  "sourceUrl"
                ],
                "description": "Linked attribution metadata for third-party images. Currently used for Unsplash photos.",
                "additionalProperties": false
              },
              "coverImageBrightness": {
                "type": "integer",
                "minimum": 40,
                "maximum": 140
              },
              "coverImageLayout": {
                "type": "string",
                "enum": [
                  "stack",
                  "split",
                  "wallpaper"
                ]
              },
              "coverImageSplitSide": {
                "type": "string",
                "enum": [
                  "left",
                  "right"
                ]
              },
              "fields": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "Stable field id. Required when adding a field only if you need a caller-supplied id; ignored by update_field patches."
                    },
                    "type": {
                      "type": "string",
                      "enum": [
                        "text",
                        "email",
                        "number",
                        "signature",
                        "scheduler",
                        "rating",
                        "nps",
                        "opinion_scale",
                        "matrix",
                        "file_upload",
                        "video_audio",
                        "address",
                        "date",
                        "textarea",
                        "statement",
                        "select",
                        "radio",
                        "picture_choice",
                        "ranking",
                        "checkbox"
                      ],
                      "description": "Builder field type. Reuse the exact type strings returned by formasty_get_form()."
                    },
                    "label": {
                      "type": "string",
                      "description": "Primary field label shown to respondents."
                    },
                    "required": {
                      "type": "boolean",
                      "description": "Whether the respondent must answer this field."
                    },
                    "hidden": {
                      "type": "boolean",
                      "description": "Whether the field is hidden from respondents and mainly used for workflow/data capture."
                    },
                    "helpText": {
                      "type": "string",
                      "description": "Helper copy shown below the label."
                    },
                    "description": {
                      "type": "string",
                      "description": "Alias for helpText accepted by MCP field mutations. Prefer helpText for canonical draft schemas."
                    },
                    "requiredMessage": {
                      "type": "string"
                    },
                    "defaultValue": {
                      "type": "string"
                    },
                    "urlParameter": {
                      "type": "string",
                      "description": "URL parameter name used for prefill when the field type supports it."
                    },
                    "placeholder": {
                      "type": "string"
                    },
                    "textSubtype": {
                      "type": "string",
                      "enum": [
                        "phone",
                        "website"
                      ]
                    },
                    "textareaSize": {
                      "type": "string",
                      "enum": [
                        "small",
                        "medium",
                        "large",
                        "extralarge"
                      ]
                    },
                    "statementEmbedUrl": {
                      "type": "string",
                      "description": "Absolute URL string. Prefer https URLs for public assets and integrations."
                    },
                    "statementAlign": {
                      "type": "string",
                      "enum": [
                        "left",
                        "center"
                      ]
                    },
                    "minNumber": {
                      "type": "number"
                    },
                    "maxNumber": {
                      "type": "number"
                    },
                    "minCharacters": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "maxCharacters": {
                      "type": "integer",
                      "minimum": 1
                    },
                    "addressVisibility": {
                      "type": "object",
                      "properties": {
                        "line2": {
                          "type": "boolean"
                        },
                        "city": {
                          "type": "boolean"
                        },
                        "state": {
                          "type": "boolean"
                        },
                        "postalCode": {
                          "type": "boolean"
                        },
                        "country": {
                          "type": "boolean"
                        }
                      },
                      "description": "Address subfield visibility controls.",
                      "additionalProperties": false
                    },
                    "addressConfig": {
                      "type": "object",
                      "properties": {
                        "line1": {
                          "type": "object",
                          "properties": {
                            "label": {
                              "type": "string"
                            },
                            "placeholder": {
                              "type": "string"
                            },
                            "required": {
                              "type": "boolean"
                            }
                          },
                          "required": [
                            "label",
                            "placeholder",
                            "required"
                          ],
                          "additionalProperties": false
                        },
                        "line2": {
                          "type": "object",
                          "properties": {
                            "label": {
                              "type": "string"
                            },
                            "placeholder": {
                              "type": "string"
                            },
                            "required": {
                              "type": "boolean"
                            }
                          },
                          "required": [
                            "label",
                            "placeholder",
                            "required"
                          ],
                          "additionalProperties": false
                        },
                        "city": {
                          "type": "object",
                          "properties": {
                            "label": {
                              "type": "string"
                            },
                            "placeholder": {
                              "type": "string"
                            },
                            "required": {
                              "type": "boolean"
                            }
                          },
                          "required": [
                            "label",
                            "placeholder",
                            "required"
                          ],
                          "additionalProperties": false
                        },
                        "state": {
                          "type": "object",
                          "properties": {
                            "label": {
                              "type": "string"
                            },
                            "placeholder": {
                              "type": "string"
                            },
                            "required": {
                              "type": "boolean"
                            }
                          },
                          "required": [
                            "label",
                            "placeholder",
                            "required"
                          ],
                          "additionalProperties": false
                        },
                        "postalCode": {
                          "type": "object",
                          "properties": {
                            "label": {
                              "type": "string"
                            },
                            "placeholder": {
                              "type": "string"
                            },
                            "required": {
                              "type": "boolean"
                            }
                          },
                          "required": [
                            "label",
                            "placeholder",
                            "required"
                          ],
                          "additionalProperties": false
                        },
                        "country": {
                          "type": "object",
                          "properties": {
                            "label": {
                              "type": "string"
                            },
                            "placeholder": {
                              "type": "string"
                            },
                            "required": {
                              "type": "boolean"
                            }
                          },
                          "required": [
                            "label",
                            "placeholder",
                            "required"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "description": "Per-subfield address labels, placeholders, and required flags.",
                      "additionalProperties": false
                    },
                    "maxStars": {
                      "type": "integer",
                      "minimum": 1
                    },
                    "allowHalfStars": {
                      "type": "boolean"
                    },
                    "minScaleValue": {
                      "type": "integer",
                      "enum": [
                        0,
                        1
                      ]
                    },
                    "maxScale": {
                      "type": "integer",
                      "minimum": 2
                    },
                    "leftLabel": {
                      "type": "string"
                    },
                    "rightLabel": {
                      "type": "string"
                    },
                    "singleRowOnMobile": {
                      "type": "boolean"
                    },
                    "rows": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "Stable option id. Reuse existing ids when editing an existing field; supply a new id when adding a new option."
                          },
                          "label": {
                            "type": "string",
                            "description": "Human-readable option label shown in the form."
                          },
                          "value": {
                            "type": "string",
                            "description": "Submitted option value. Keep it stable once the form is live unless you intend to change downstream data."
                          },
                          "imageUrl": {
                            "type": "string",
                            "description": "Optional image URL for picture choice options. Leave unset for text-only choices."
                          },
                          "calcValue": {
                            "type": "number",
                            "description": "Optional numeric value contributed to calculated variables when this option is selected (select, radio, picture_choice, checkbox only; not ranking/matrix). Finite, |value| <= 1e9; decimals allowed."
                          }
                        },
                        "required": [
                          "id",
                          "label",
                          "value"
                        ],
                        "description": "Choice option payload used by select, radio, checkbox, picture_choice, ranking, and matrix fields.",
                        "additionalProperties": false
                      }
                    },
                    "columns": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "Stable option id. Reuse existing ids when editing an existing field; supply a new id when adding a new option."
                          },
                          "label": {
                            "type": "string",
                            "description": "Human-readable option label shown in the form."
                          },
                          "value": {
                            "type": "string",
                            "description": "Submitted option value. Keep it stable once the form is live unless you intend to change downstream data."
                          },
                          "imageUrl": {
                            "type": "string",
                            "description": "Optional image URL for picture choice options. Leave unset for text-only choices."
                          },
                          "calcValue": {
                            "type": "number",
                            "description": "Optional numeric value contributed to calculated variables when this option is selected (select, radio, picture_choice, checkbox only; not ranking/matrix). Finite, |value| <= 1e9; decimals allowed."
                          }
                        },
                        "required": [
                          "id",
                          "label",
                          "value"
                        ],
                        "description": "Choice option payload used by select, radio, checkbox, picture_choice, ranking, and matrix fields.",
                        "additionalProperties": false
                      }
                    },
                    "allowMultipleSelection": {
                      "type": "boolean"
                    },
                    "maxFileSizeMb": {
                      "type": "number",
                      "minimum": 1
                    },
                    "allowMultiple": {
                      "type": "boolean"
                    },
                    "allowedFileTypes": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      },
                      "description": "Allowed upload file type ids. Reuse values already supported by the Forms API/upload configuration."
                    },
                    "schedulerProvider": {
                      "type": "string",
                      "enum": [
                        "tidycal",
                        "calendly",
                        "savvycal",
                        "calcom"
                      ]
                    },
                    "schedulerUrl": {
                      "type": "string",
                      "description": "Public booking URL for scheduler fields. If omitted or empty, MCP returns a scheduler_url_missing notice that the agent must tell the user about."
                    },
                    "calendarOpenerLabel": {
                      "type": "string"
                    },
                    "randomizeOptions": {
                      "type": "boolean"
                    },
                    "horizontalOptions": {
                      "type": "boolean"
                    },
                    "optionColumns": {
                      "type": "integer",
                      "enum": [
                        1,
                        2,
                        3
                      ]
                    },
                    "checkboxMode": {
                      "type": "string",
                      "enum": [
                        "multi",
                        "single",
                        "yes_no"
                      ]
                    },
                    "includeOtherOption": {
                      "type": "boolean"
                    },
                    "selectionLimitMode": {
                      "type": "string",
                      "enum": [
                        "none",
                        "exact",
                        "range"
                      ]
                    },
                    "selectionLimitExact": {
                      "type": "integer",
                      "minimum": 1
                    },
                    "selectionLimitMin": {
                      "type": "integer",
                      "minimum": 1
                    },
                    "selectionLimitMax": {
                      "type": "integer",
                      "minimum": 1
                    },
                    "options": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "Stable option id. Reuse existing ids when editing an existing field; supply a new id when adding a new option."
                          },
                          "label": {
                            "type": "string",
                            "description": "Human-readable option label shown in the form."
                          },
                          "value": {
                            "type": "string",
                            "description": "Submitted option value. Keep it stable once the form is live unless you intend to change downstream data."
                          },
                          "imageUrl": {
                            "type": "string",
                            "description": "Optional image URL for picture choice options. Leave unset for text-only choices."
                          },
                          "calcValue": {
                            "type": "number",
                            "description": "Optional numeric value contributed to calculated variables when this option is selected (select, radio, picture_choice, checkbox only; not ranking/matrix). Finite, |value| <= 1e9; decimals allowed."
                          }
                        },
                        "required": [
                          "id",
                          "label",
                          "value"
                        ],
                        "description": "Choice option payload used by select, radio, checkbox, picture_choice, ranking, and matrix fields.",
                        "additionalProperties": false
                      },
                      "description": "Choice options. Required for select, radio, checkbox, picture_choice, and ranking fields."
                    }
                  },
                  "required": [
                    "type",
                    "label",
                    "required"
                  ],
                  "description": "Field payload for add_field and full draft schemas. MCP exposes every active builder field type except payment. Choice fields also require options with id, label, and value. Do not add respondent input fields to the leading welcome screen; add them to a later question step.",
                  "additionalProperties": false
                },
                "description": "Ordered field list for this step. Multiple respondent input fields are allowed when they belong together on the same screen, such as compact contact details or tightly related grouped follow-ups."
              }
            },
            "required": [
              "fields"
            ],
            "description": "Draft step payload. Use formasty_get_form() as the canonical source of current step ids and structure. The leading welcome screen must be a statement-only intro; respondent input fields belong in later steps and may be grouped when the form experience benefits from multiple fields on one screen.",
            "additionalProperties": false
          },
          "description": "Ordered draft steps. MCP supports a leading welcome screen as the first statement-only step. Later question steps may contain one or multiple fields when grouping improves the respondent experience."
        },
        "settings": {
          "type": "object",
          "properties": {
            "name": {
              "type": "string",
              "description": "Form title shown across builder, dashboard, and public runtime."
            },
            "description": {
              "type": "string"
            },
            "slug": {
              "type": "string"
            },
            "searchEngineIndexing": {
              "type": "boolean",
              "description": "Legacy explicit discovery permission. Use discoveryMode for workspace inheritance. Live current-owner consent, publication and open access remain required. Imports/copies stay off. Responses and result-share URLs remain noindex."
            },
            "discoveryMode": {
              "type": "string",
              "enum": [
                "inherit",
                "on",
                "off"
              ],
              "description": "inherit follows the current owner's all/selected/none workspace default; on explicitly enables this form even with default none; off always disables it. Legacy schemas without this property use searchEngineIndexing as an explicit override. New ordinary forms inherit; imports/copies stay off. Google indexing/ranking is not guaranteed."
            },
            "successMessage": {
              "type": "string"
            },
            "redirectUrl": {
              "type": "string",
              "description": "Absolute URL string. Prefer https URLs for public assets and integrations."
            },
            "submitButtonLabel": {
              "type": "string"
            },
            "labels": {
              "type": "object",
              "properties": {
                "nextQuestionKeyboardInstruction": {
                  "type": "string"
                },
                "submitKeyboardInstruction": {
                  "type": "string"
                },
                "otherOptionLabel": {
                  "type": "string"
                },
                "otherOptionHint": {
                  "type": "string"
                },
                "uploadInstruction": {
                  "type": "string"
                },
                "uploadMaxFileSizeMessage": {
                  "type": "string"
                },
                "uploadInProgressMessage": {
                  "type": "string"
                },
                "uploadFinishingMessage": {
                  "type": "string"
                },
                "offlineErrorMessage": {
                  "type": "string"
                },
                "onlineRestoredMessage": {
                  "type": "string"
                },
                "serverErrorMessage": {
                  "type": "string"
                },
                "uploadErrorMessage": {
                  "type": "string"
                },
                "uploadFileSizeErrorMessage": {
                  "type": "string"
                },
                "uploadFileTypeErrorMessage": {
                  "type": "string"
                },
                "schedulerRequiredErrorMessage": {
                  "type": "string"
                },
                "duplicateSubmissionTitle": {
                  "type": "string"
                },
                "duplicateSubmissionDescription": {
                  "type": "string"
                }
              },
              "description": "Runtime copy labels shown across the live form and embeds.",
              "additionalProperties": false
            },
            "builder": {
              "type": "object",
              "properties": {
                "createStepPerField": {
                  "type": "boolean"
                },
                "requiresProPublish": {
                  "type": "boolean",
                  "readOnly": true,
                  "description": "Server-managed publish gate. Preserve a returned true value; do not set this property on new drafts."
                }
              },
              "description": "Builder-only editing preferences.",
              "additionalProperties": false
            },
            "hidden": {
              "type": "object",
              "properties": {
                "hiddenFields": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "key": {
                        "type": "string",
                        "description": "Hidden field key. Use only letters, numbers, and underscores."
                      },
                      "defaultValue": {
                        "type": "string",
                        "description": "Default hidden field value."
                      }
                    },
                    "required": [
                      "key",
                      "defaultValue"
                    ],
                    "additionalProperties": false
                  }
                },
                "variables": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "description": "Stable workflow variable id. Omit when creating a new variable, or provide an existing id to update that variable."
                      },
                      "name": {
                        "type": "string",
                        "description": "Workflow variable token name. Use only letters, numbers, and underscores."
                      },
                      "type": {
                        "type": "string",
                        "enum": [
                          "number",
                          "text"
                        ],
                        "description": "Variable value type used by workflow conditions and actions."
                      },
                      "initialValue": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "number"
                          },
                          {
                            "type": "null"
                          }
                        ],
                        "description": "Optional initial value. Number variables require a numeric value; text variables accept a string."
                      },
                      "formula": {
                        "type": "string",
                        "description": "Optional formula (number variables only) turning this into a calculated variable. Refs: {{var:<id>}} and {{field:<id>}}. Functions: IF, MIN, MAX, ROUND, FLOOR, CEIL, ABS. Operators + - * / and comparisons. Max 500 chars. Must reference existing fields/variables; no self/circular references. Calculated variables cannot be targets of workflow variable actions."
                      },
                      "format": {
                        "type": "object",
                        "description": "Optional display format for a number/calculated variable shown on the form.",
                        "properties": {
                          "kind": {
                            "type": "string",
                            "enum": [
                              "number",
                              "currency",
                              "percent"
                            ],
                            "description": "Display format kind."
                          },
                          "currency": {
                            "type": "string",
                            "description": "ISO currency code, required when kind is currency (USD, EUR, GBP, INR, CAD, AUD, JPY, AED, SGD)."
                          },
                          "decimals": {
                            "type": "integer",
                            "enum": [
                              0,
                              1,
                              2
                            ],
                            "description": "Optional decimal places."
                          }
                        },
                        "required": [
                          "kind"
                        ],
                        "additionalProperties": false
                      },
                      "showOnForm": {
                        "type": "boolean",
                        "description": "When true, show a live result pill for this calculated variable on the public form."
                      }
                    },
                    "required": [
                      "name",
                      "type"
                    ],
                    "description": "Workflow variable definition stored in settings.hidden.variables.",
                    "additionalProperties": false
                  },
                  "description": "Workflow-tab variable definitions available to variable conditions and variable actions."
                }
              },
              "description": "Hidden fields and Workflow variables. Prefer formasty_configure_workflow_variables for narrow variable-only MCP edits.",
              "additionalProperties": false
            },
            "submissions": {
              "type": "object",
              "properties": {
                "autosaveProgress": {
                  "type": "boolean",
                  "description": "Stores respondent progress in their browser so reopening the same public form can continue from the last session."
                },
                "anonymousResponses": {
                  "type": "boolean",
                  "description": "When true, Formasty avoids collecting respondent identity metadata that is not part of the submitted answers."
                },
                "preventDuplicates": {
                  "type": "boolean"
                },
                "dedupe": {
                  "type": "object",
                  "properties": {
                    "cookie": {
                      "type": "object",
                      "properties": {
                        "enabled": {
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "enabled"
                      ],
                      "additionalProperties": false
                    },
                    "uniqueField": {
                      "type": "object",
                      "properties": {
                        "enabled": {
                          "type": "boolean"
                        },
                        "fieldId": {
                          "type": "string",
                          "description": "Field id used for duplicate prevention."
                        },
                        "normalize": {
                          "type": "string",
                          "enum": [
                            "lower_trim",
                            "trim",
                            "none"
                          ]
                        }
                      },
                      "description": "Unique-field duplicate prevention settings.",
                      "additionalProperties": false
                    }
                  },
                  "description": "Submission dedupe controls.",
                  "additionalProperties": false
                },
                "thankYou": {
                  "type": "object",
                  "properties": {
                    "mode": {
                      "type": "string",
                      "enum": [
                        "message",
                        "redirect"
                      ]
                    },
                    "redirectUrl": {
                      "type": "string",
                      "description": "Absolute URL string. Prefer https URLs for public assets and integrations."
                    },
                    "title": {
                      "type": "string"
                    },
                    "description": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "showSocialShareIcons": {
                      "type": "boolean"
                    },
                    "socialShareLinks": {
                      "type": "object",
                      "properties": {
                        "facebook": {
                          "type": "string",
                          "description": "Absolute URL string. Prefer https URLs for public assets and integrations."
                        },
                        "x": {
                          "type": "string",
                          "description": "Absolute URL string. Prefer https URLs for public assets and integrations."
                        },
                        "linkedin": {
                          "type": "string",
                          "description": "Absolute URL string. Prefer https URLs for public assets and integrations."
                        }
                      },
                      "description": "Optional social share links rendered on thank-you screens.",
                      "additionalProperties": false
                    },
                    "showButton": {
                      "type": "boolean"
                    },
                    "buttonLabel": {
                      "type": "string"
                    },
                    "buttonUrl": {
                      "type": "string",
                      "description": "Absolute URL string. Prefer https URLs for public assets and integrations."
                    },
                    "buttonOpenInNewTab": {
                      "type": "boolean"
                    },
                    "mediaUrl": {
                      "type": "string",
                      "description": "Absolute URL string. Prefer https URLs for public assets and integrations."
                    },
                    "mediaType": {
                      "type": "string",
                      "enum": [
                        "image",
                        "video"
                      ]
                    },
                    "mediaAlt": {
                      "type": "string"
                    },
                    "mediaAttribution": {
                      "type": "object",
                      "properties": {
                        "provider": {
                          "type": "string",
                          "enum": [
                            "unsplash"
                          ]
                        },
                        "photographerName": {
                          "type": "string"
                        },
                        "photographerUrl": {
                          "type": "string",
                          "description": "Absolute URL string. Prefer https URLs for public assets and integrations."
                        },
                        "sourceName": {
                          "type": "string",
                          "enum": [
                            "Unsplash"
                          ]
                        },
                        "sourceUrl": {
                          "type": "string",
                          "description": "Absolute URL string. Prefer https URLs for public assets and integrations."
                        },
                        "photoUrl": {
                          "type": "string",
                          "description": "Absolute URL string. Prefer https URLs for public assets and integrations."
                        }
                      },
                      "required": [
                        "provider",
                        "photographerName",
                        "photographerUrl",
                        "sourceUrl"
                      ],
                      "description": "Linked attribution metadata for third-party images. Currently used for Unsplash photos.",
                      "additionalProperties": false
                    },
                    "logoUrl": {
                      "type": "string",
                      "description": "Absolute URL string. Prefer https URLs for public assets and integrations."
                    },
                    "logoAttribution": {
                      "type": "object",
                      "properties": {
                        "provider": {
                          "type": "string",
                          "enum": [
                            "unsplash"
                          ]
                        },
                        "photographerName": {
                          "type": "string"
                        },
                        "photographerUrl": {
                          "type": "string",
                          "description": "Absolute URL string. Prefer https URLs for public assets and integrations."
                        },
                        "sourceName": {
                          "type": "string",
                          "enum": [
                            "Unsplash"
                          ]
                        },
                        "sourceUrl": {
                          "type": "string",
                          "description": "Absolute URL string. Prefer https URLs for public assets and integrations."
                        },
                        "photoUrl": {
                          "type": "string",
                          "description": "Absolute URL string. Prefer https URLs for public assets and integrations."
                        }
                      },
                      "required": [
                        "provider",
                        "photographerName",
                        "photographerUrl",
                        "sourceUrl"
                      ],
                      "description": "Linked attribution metadata for third-party images. Currently used for Unsplash photos.",
                      "additionalProperties": false
                    },
                    "titleSize": {
                      "type": "string",
                      "enum": [
                        "sm",
                        "md",
                        "lg"
                      ]
                    },
                    "textAlign": {
                      "type": "string",
                      "enum": [
                        "left",
                        "center"
                      ]
                    },
                    "backgroundColor": {
                      "type": "string",
                      "description": "Color token such as #RRGGBB, rgb(...), or rgba(...). Use the same values returned by formasty_get_form."
                    },
                    "backgroundImageUrl": {
                      "type": "string",
                      "description": "Absolute URL string. Prefer https URLs for public assets and integrations."
                    },
                    "backgroundImageAttribution": {
                      "type": "object",
                      "properties": {
                        "provider": {
                          "type": "string",
                          "enum": [
                            "unsplash"
                          ]
                        },
                        "photographerName": {
                          "type": "string"
                        },
                        "photographerUrl": {
                          "type": "string",
                          "description": "Absolute URL string. Prefer https URLs for public assets and integrations."
                        },
                        "sourceName": {
                          "type": "string",
                          "enum": [
                            "Unsplash"
                          ]
                        },
                        "sourceUrl": {
                          "type": "string",
                          "description": "Absolute URL string. Prefer https URLs for public assets and integrations."
                        },
                        "photoUrl": {
                          "type": "string",
                          "description": "Absolute URL string. Prefer https URLs for public assets and integrations."
                        }
                      },
                      "required": [
                        "provider",
                        "photographerName",
                        "photographerUrl",
                        "sourceUrl"
                      ],
                      "description": "Linked attribution metadata for third-party images. Currently used for Unsplash photos.",
                      "additionalProperties": false
                    },
                    "backgroundImageBrightness": {
                      "type": "integer",
                      "minimum": 40,
                      "maximum": 140
                    },
                    "headingColor": {
                      "type": "string",
                      "description": "Color token such as #RRGGBB, rgb(...), or rgba(...). Use the same values returned by formasty_get_form."
                    },
                    "descriptionColor": {
                      "type": "string",
                      "description": "Color token such as #RRGGBB, rgb(...), or rgba(...). Use the same values returned by formasty_get_form."
                    },
                    "buttonBackgroundColor": {
                      "type": "string",
                      "description": "Color token such as #RRGGBB, rgb(...), or rgba(...). Use the same values returned by formasty_get_form."
                    },
                    "buttonTextColor": {
                      "type": "string",
                      "description": "Color token such as #RRGGBB, rgb(...), or rgba(...). Use the same values returned by formasty_get_form."
                    },
                    "buttonRadius": {
                      "type": "string",
                      "enum": [
                        "none",
                        "sm",
                        "lg"
                      ],
                      "description": "Thank-you button radius. Allowed values are only \"none\", \"sm\", and \"lg\"; \"md\" is not supported."
                    },
                    "resultPage": {
                      "type": "object",
                      "properties": {
                        "highlights": {
                          "type": "array",
                          "maxItems": 5,
                          "items": {
                            "type": "string",
                            "maxLength": 160
                          },
                          "description": "Optional concise result-page bullets. Empty strings are ignored."
                        },
                        "cta": {
                          "type": "object",
                          "properties": {
                            "label": {
                              "type": "string",
                              "maxLength": 80
                            },
                            "url": {
                              "type": "string",
                              "description": "Absolute URL string. Prefer https URLs for public assets and integrations."
                            }
                          },
                          "required": [
                            "label",
                            "url"
                          ],
                          "description": "Optional result-page CTA. Use a real URL only; do not invent booking links.",
                          "additionalProperties": false
                        }
                      },
                      "description": "Optional scorecard/result-page block for useful outcome summaries, highlights, and CTAs on thank-you screens.",
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "mode"
                  ],
                  "description": "Primary submission thank-you configuration.",
                  "additionalProperties": false
                },
                "thankYouScreens": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "description": "Stable thank-you screen id."
                      },
                      "title": {
                        "type": "string"
                      },
                      "description": {
                        "type": "string"
                      },
                      "message": {
                        "type": "string"
                      },
                      "showSocialShareIcons": {
                        "type": "boolean"
                      },
                      "socialShareLinks": {
                        "type": "object",
                        "properties": {
                          "facebook": {
                            "type": "string",
                            "description": "Absolute URL string. Prefer https URLs for public assets and integrations."
                          },
                          "x": {
                            "type": "string",
                            "description": "Absolute URL string. Prefer https URLs for public assets and integrations."
                          },
                          "linkedin": {
                            "type": "string",
                            "description": "Absolute URL string. Prefer https URLs for public assets and integrations."
                          }
                        },
                        "description": "Optional social share links rendered on thank-you screens.",
                        "additionalProperties": false
                      },
                      "showButton": {
                        "type": "boolean"
                      },
                      "buttonLabel": {
                        "type": "string"
                      },
                      "buttonUrl": {
                        "type": "string",
                        "description": "Absolute URL string. Prefer https URLs for public assets and integrations."
                      },
                      "buttonOpenInNewTab": {
                        "type": "boolean"
                      },
                      "mediaUrl": {
                        "type": "string",
                        "description": "Absolute URL string. Prefer https URLs for public assets and integrations."
                      },
                      "mediaType": {
                        "type": "string",
                        "enum": [
                          "image",
                          "video"
                        ]
                      },
                      "mediaAlt": {
                        "type": "string"
                      },
                      "mediaAttribution": {
                        "type": "object",
                        "properties": {
                          "provider": {
                            "type": "string",
                            "enum": [
                              "unsplash"
                            ]
                          },
                          "photographerName": {
                            "type": "string"
                          },
                          "photographerUrl": {
                            "type": "string",
                            "description": "Absolute URL string. Prefer https URLs for public assets and integrations."
                          },
                          "sourceName": {
                            "type": "string",
                            "enum": [
                              "Unsplash"
                            ]
                          },
                          "sourceUrl": {
                            "type": "string",
                            "description": "Absolute URL string. Prefer https URLs for public assets and integrations."
                          },
                          "photoUrl": {
                            "type": "string",
                            "description": "Absolute URL string. Prefer https URLs for public assets and integrations."
                          }
                        },
                        "required": [
                          "provider",
                          "photographerName",
                          "photographerUrl",
                          "sourceUrl"
                        ],
                        "description": "Linked attribution metadata for third-party images. Currently used for Unsplash photos.",
                        "additionalProperties": false
                      },
                      "logoUrl": {
                        "type": "string",
                        "description": "Absolute URL string. Prefer https URLs for public assets and integrations."
                      },
                      "logoAttribution": {
                        "type": "object",
                        "properties": {
                          "provider": {
                            "type": "string",
                            "enum": [
                              "unsplash"
                            ]
                          },
                          "photographerName": {
                            "type": "string"
                          },
                          "photographerUrl": {
                            "type": "string",
                            "description": "Absolute URL string. Prefer https URLs for public assets and integrations."
                          },
                          "sourceName": {
                            "type": "string",
                            "enum": [
                              "Unsplash"
                            ]
                          },
                          "sourceUrl": {
                            "type": "string",
                            "description": "Absolute URL string. Prefer https URLs for public assets and integrations."
                          },
                          "photoUrl": {
                            "type": "string",
                            "description": "Absolute URL string. Prefer https URLs for public assets and integrations."
                          }
                        },
                        "required": [
                          "provider",
                          "photographerName",
                          "photographerUrl",
                          "sourceUrl"
                        ],
                        "description": "Linked attribution metadata for third-party images. Currently used for Unsplash photos.",
                        "additionalProperties": false
                      },
                      "titleSize": {
                        "type": "string",
                        "enum": [
                          "sm",
                          "md",
                          "lg"
                        ]
                      },
                      "textAlign": {
                        "type": "string",
                        "enum": [
                          "left",
                          "center"
                        ]
                      },
                      "backgroundColor": {
                        "type": "string",
                        "description": "Color token such as #RRGGBB, rgb(...), or rgba(...). Use the same values returned by formasty_get_form."
                      },
                      "backgroundImageUrl": {
                        "type": "string",
                        "description": "Absolute URL string. Prefer https URLs for public assets and integrations."
                      },
                      "backgroundImageAttribution": {
                        "type": "object",
                        "properties": {
                          "provider": {
                            "type": "string",
                            "enum": [
                              "unsplash"
                            ]
                          },
                          "photographerName": {
                            "type": "string"
                          },
                          "photographerUrl": {
                            "type": "string",
                            "description": "Absolute URL string. Prefer https URLs for public assets and integrations."
                          },
                          "sourceName": {
                            "type": "string",
                            "enum": [
                              "Unsplash"
                            ]
                          },
                          "sourceUrl": {
                            "type": "string",
                            "description": "Absolute URL string. Prefer https URLs for public assets and integrations."
                          },
                          "photoUrl": {
                            "type": "string",
                            "description": "Absolute URL string. Prefer https URLs for public assets and integrations."
                          }
                        },
                        "required": [
                          "provider",
                          "photographerName",
                          "photographerUrl",
                          "sourceUrl"
                        ],
                        "description": "Linked attribution metadata for third-party images. Currently used for Unsplash photos.",
                        "additionalProperties": false
                      },
                      "backgroundImageBrightness": {
                        "type": "integer",
                        "minimum": 40,
                        "maximum": 140
                      },
                      "headingColor": {
                        "type": "string",
                        "description": "Color token such as #RRGGBB, rgb(...), or rgba(...). Use the same values returned by formasty_get_form."
                      },
                      "descriptionColor": {
                        "type": "string",
                        "description": "Color token such as #RRGGBB, rgb(...), or rgba(...). Use the same values returned by formasty_get_form."
                      },
                      "buttonBackgroundColor": {
                        "type": "string",
                        "description": "Color token such as #RRGGBB, rgb(...), or rgba(...). Use the same values returned by formasty_get_form."
                      },
                      "buttonTextColor": {
                        "type": "string",
                        "description": "Color token such as #RRGGBB, rgb(...), or rgba(...). Use the same values returned by formasty_get_form."
                      },
                      "buttonRadius": {
                        "type": "string",
                        "enum": [
                          "none",
                          "sm",
                          "lg"
                        ],
                        "description": "Thank-you button radius. Allowed values are only \"none\", \"sm\", and \"lg\"; \"md\" is not supported."
                      },
                      "resultPage": {
                        "type": "object",
                        "properties": {
                          "highlights": {
                            "type": "array",
                            "maxItems": 5,
                            "items": {
                              "type": "string",
                              "maxLength": 160
                            },
                            "description": "Optional concise result-page bullets. Empty strings are ignored."
                          },
                          "cta": {
                            "type": "object",
                            "properties": {
                              "label": {
                                "type": "string",
                                "maxLength": 80
                              },
                              "url": {
                                "type": "string",
                                "description": "Absolute URL string. Prefer https URLs for public assets and integrations."
                              }
                            },
                            "required": [
                              "label",
                              "url"
                            ],
                            "description": "Optional result-page CTA. Use a real URL only; do not invent booking links.",
                            "additionalProperties": false
                          }
                        },
                        "description": "Optional scorecard/result-page block for useful outcome summaries, highlights, and CTAs on thank-you screens.",
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "id"
                    ],
                    "description": "Additional thank-you screen definition used by branching, match/personality quiz endings, and score quiz ranges.",
                    "additionalProperties": false
                  }
                }
              },
              "description": "Submission behavior, duplicate prevention, and thank-you screen configuration.",
              "additionalProperties": false
            },
            "privacy": {
              "type": "object",
              "properties": {},
              "description": "Privacy settings use the same contract returned by formasty_get_form(). Preserve unknown keys unless you intentionally change them.",
              "additionalProperties": true
            }
          },
          "description": "Top-level form settings contract used in full draft schemas.",
          "additionalProperties": false
        },
        "theme": {
          "type": "object",
          "properties": {
            "fontFamily": {
              "type": "string",
              "enum": [
                "system",
                "custom",
                "sohne",
                "satoshi",
                "plus_jakarta_sans",
                "inter",
                "manrope",
                "dm_sans",
                "poppins",
                "nunito",
                "playfair_display",
                "roboto_slab",
                "space_grotesk",
                "ibm_plex_mono"
              ]
            },
            "customFont": {
              "type": "object",
              "properties": {
                "family": {
                  "type": "string"
                },
                "fileName": {
                  "type": "string"
                },
                "assetId": {
                  "type": "string"
                },
                "format": {
                  "type": "string",
                  "enum": [
                    "woff2",
                    "woff",
                    "ttf",
                    "otf"
                  ]
                },
                "url": {
                  "type": "string",
                  "description": "Absolute URL string. Prefer https URLs for public assets and integrations."
                },
                "storageKey": {
                  "type": "string"
                }
              },
              "required": [
                "family",
                "fileName",
                "assetId",
                "format",
                "url"
              ],
              "description": "Uploaded custom font metadata. Reuse the exact values returned by the font upload flow.",
              "additionalProperties": false
            },
            "baseFontSize": {
              "type": "string",
              "enum": [
                "sm",
                "md",
                "lg"
              ]
            },
            "labelWeight": {
              "type": "string",
              "enum": [
                "normal",
                "medium",
                "semibold"
              ]
            },
            "backgroundColor": {
              "type": "string",
              "description": "Color token such as #RRGGBB, rgb(...), or rgba(...). Use the same values returned by formasty_get_form."
            },
            "fontSizeScale": {
              "type": "string",
              "enum": [
                "compact",
                "default",
                "spacious"
              ]
            },
            "headingWeight": {
              "type": "integer",
              "enum": [
                600,
                700
              ]
            },
            "background": {
              "type": "object",
              "properties": {
                "type": {
                  "type": "string",
                  "enum": [
                    "solid"
                  ]
                },
                "value": {
                  "type": "string",
                  "description": "Color token such as #RRGGBB, rgb(...), or rgba(...). Use the same values returned by formasty_get_form."
                }
              },
              "required": [
                "type",
                "value"
              ],
              "additionalProperties": false,
              "description": "MCP-created and MCP-edited forms use solid form backgrounds only. Use backgroundColor for the page background; keep outcome-specific colors on thank-you screens."
            },
            "surfaceColor": {
              "type": "string",
              "description": "Color token such as #RRGGBB, rgb(...), or rgba(...). Use the same values returned by formasty_get_form."
            },
            "textColor": {
              "type": "string",
              "description": "Color token such as #RRGGBB, rgb(...), or rgba(...). Use the same values returned by formasty_get_form."
            },
            "accentColor": {
              "type": "string",
              "description": "Color token such as #RRGGBB, rgb(...), or rgba(...). Use the same values returned by formasty_get_form."
            },
            "linkColor": {
              "type": "string",
              "description": "Color token such as #RRGGBB, rgb(...), or rgba(...). Use the same values returned by formasty_get_form."
            },
            "borderColor": {
              "type": "string",
              "description": "Color token such as #RRGGBB, rgb(...), or rgba(...). Use the same values returned by formasty_get_form."
            },
            "buttonTextColor": {
              "type": "string",
              "description": "Color token such as #RRGGBB, rgb(...), or rgba(...). Use the same values returned by formasty_get_form."
            },
            "primaryColor": {
              "type": "string",
              "description": "Color token such as #RRGGBB, rgb(...), or rgba(...). Use the same values returned by formasty_get_form."
            },
            "secondaryColor": {
              "type": "string",
              "description": "Color token such as #RRGGBB, rgb(...), or rgba(...). Use the same values returned by formasty_get_form."
            },
            "borderIntensity": {
              "type": "string",
              "enum": [
                "subtle",
                "medium"
              ]
            },
            "radius": {
              "type": "string",
              "enum": [
                "none",
                "sm",
                "md",
                "lg"
              ]
            },
            "density": {
              "type": "string",
              "enum": [
                "compact",
                "comfortable",
                "airy"
              ]
            },
            "inputSpacing": {
              "type": "string",
              "enum": [
                "compact",
                "comfortable",
                "airy"
              ]
            },
            "width": {
              "type": "string",
              "enum": [
                "narrow",
                "medium",
                "wide"
              ]
            },
            "progress": {
              "type": "string",
              "enum": [
                "none",
                "fraction",
                "dots"
              ]
            },
            "progressStyle": {
              "type": "string",
              "enum": [
                "none",
                "step_count",
                "bar"
              ]
            },
            "previewMode": {
              "type": "string",
              "enum": [
                "single-step",
                "stacked"
              ]
            },
            "buttonStyle": {
              "type": "string",
              "enum": [
                "filled",
                "outline"
              ]
            },
            "alignment": {
              "type": "string",
              "enum": [
                "left",
                "center",
                "right"
              ]
            },
            "brandPalette": {
              "type": "array",
              "maxItems": 8,
              "items": {
                "type": "string",
                "description": "Color token such as #RRGGBB, rgb(...), or rgba(...). Use the same values returned by formasty_get_form."
              },
              "description": "Optional brand palette swatches shown in the builder design system."
            },
            "hoverLift": {
              "type": "boolean"
            },
            "showBrandBadge": {
              "type": "boolean"
            },
            "branding": {
              "type": "object",
              "properties": {
                "showPoweredBy": {
                  "type": "boolean",
                  "description": "Whether to show Formasty branding badges where the current plan allows it."
                },
                "logoUrl": {
                  "type": "string",
                  "description": "Absolute URL string. Prefer https URLs for public assets and integrations."
                },
                "logoScale": {
                  "type": "number",
                  "minimum": 0.7,
                  "maximum": 1.3
                }
              },
              "description": "Branding controls nested under theme.branding.",
              "additionalProperties": false
            }
          },
          "description": "Partial theme patch. Use the same keys returned by formasty_get_form().form.draftSchema.theme.",
          "additionalProperties": false
        },
        "workflow": {
          "type": "object",
          "properties": {
            "version": {
              "type": "integer",
              "enum": [
                1
              ]
            },
            "enabled": {
              "type": "boolean"
            },
            "rules": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "description": "Stable workflow rule id. Reuse existing ids when replacing or editing current rules."
                  },
                  "title": {
                    "type": "string",
                    "description": "Optional human-readable rule label shown in the workflow UI."
                  },
                  "source": {
                    "type": "object",
                    "properties": {
                      "stepId": {
                        "type": "string",
                        "description": "Source step id for the rule."
                      },
                      "fieldId": {
                        "type": "string",
                        "description": "Optional source field id when branching from a specific field."
                      }
                    },
                    "required": [
                      "stepId"
                    ],
                    "additionalProperties": false
                  },
                  "match": {
                    "type": "string",
                    "enum": [
                      "all",
                      "any"
                    ]
                  },
                  "combinator": {
                    "type": "string",
                    "enum": [
                      "and",
                      "or"
                    ]
                  },
                  "conditions": {
                    "type": "array",
                    "description": "Workflow conditions. Use an empty array for an unconditional 'always go to' route, especially for statement-only steps.",
                    "items": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "description": "Stable condition id. Reuse existing ids when editing an existing rule."
                        },
                        "sourceType": {
                          "type": "string",
                          "enum": [
                            "field",
                            "hidden_field",
                            "variable"
                          ],
                          "description": "What the condition reads from."
                        },
                        "sourceId": {
                          "type": "string",
                          "description": "Hidden field key or variable id depending on sourceType. For field conditions, prefer fieldId; sourceId is accepted as a compatibility alias."
                        },
                        "fieldId": {
                          "type": "string",
                          "description": "Field id when the condition reads from a form field."
                        },
                        "target": {
                          "type": "object",
                          "properties": {
                            "subfieldKey": {
                              "type": "string",
                              "description": "Optional subfield key for structured values such as address parts."
                            },
                            "rowKey": {
                              "type": "string",
                              "description": "Optional matrix row key when a workflow condition targets a matrix row value."
                            }
                          },
                          "description": "Optional workflow target selector for structured field values.",
                          "additionalProperties": false
                        },
                        "operator": {
                          "type": "string",
                          "enum": [
                            "equals",
                            "not_equals",
                            "contains",
                            "not_contains",
                            "starts_with",
                            "ends_with",
                            "includes",
                            "not_includes",
                            "gt",
                            "gte",
                            "lt",
                            "lte",
                            "between",
                            "is_answered",
                            "is_not_answered"
                          ],
                          "description": "Comparison operator. Use only operators that are already valid for the chosen source/target."
                        },
                        "value": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "number"
                            },
                            {
                              "type": "boolean"
                            },
                            {
                              "type": "array",
                              "minItems": 2,
                              "maxItems": 2,
                              "items": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "number"
                                  }
                                ]
                              }
                            },
                            {
                              "type": "object",
                              "properties": {
                                "min": {
                                  "anyOf": [
                                    {
                                      "type": "string"
                                    },
                                    {
                                      "type": "number"
                                    }
                                  ]
                                },
                                "max": {
                                  "anyOf": [
                                    {
                                      "type": "string"
                                    },
                                    {
                                      "type": "number"
                                    }
                                  ]
                                }
                              },
                              "required": [
                                "min",
                                "max"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "type": "array",
                              "minItems": 1,
                              "items": {
                                "type": "string"
                              }
                            }
                          ],
                          "description": "Condition value. For between, use [min,max] or {min,max}. For includes/not_includes on multi-choice values, use a string array."
                        }
                      },
                      "required": [
                        "id",
                        "operator"
                      ],
                      "description": "Workflow condition. Reuse field ids, variable ids, hidden field keys, and target ids already present in the current form snapshot.",
                      "additionalProperties": false
                    }
                  },
                  "logic": {
                    "type": "object",
                    "properties": {
                      "mode": {
                        "type": "string",
                        "enum": [
                          "simple",
                          "custom"
                        ],
                        "description": "Rule logic mode."
                      },
                      "nodes": {
                        "type": "array",
                        "items": {
                          "oneOf": [
                            {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "string"
                                },
                                "type": {
                                  "type": "string",
                                  "enum": [
                                    "condition"
                                  ]
                                },
                                "conditionId": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "id",
                                "type",
                                "conditionId"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "string"
                                },
                                "type": {
                                  "type": "string",
                                  "enum": [
                                    "group"
                                  ]
                                },
                                "groupId": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "id",
                                "type",
                                "groupId"
                              ],
                              "additionalProperties": false
                            }
                          ]
                        }
                      },
                      "combinators": {
                        "type": "array",
                        "items": {
                          "type": "string",
                          "enum": [
                            "and",
                            "or"
                          ]
                        }
                      },
                      "groups": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string"
                            },
                            "combinator": {
                              "type": "string",
                              "enum": [
                                "and",
                                "or"
                              ]
                            },
                            "conditionIds": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            }
                          },
                          "required": [
                            "id",
                            "combinator",
                            "conditionIds"
                          ],
                          "additionalProperties": false
                        }
                      }
                    },
                    "description": "Optional advanced workflow logic tree. Preserve ids when editing existing logic.",
                    "additionalProperties": false
                  },
                  "then": {
                    "oneOf": [
                      {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "enum": [
                              "step"
                            ]
                          },
                          "stepId": {
                            "type": "string",
                            "description": "Destination draft step id."
                          }
                        },
                        "required": [
                          "type",
                          "stepId"
                        ],
                        "additionalProperties": false
                      },
                      {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "enum": [
                              "thank_you"
                            ]
                          },
                          "screenId": {
                            "type": "string",
                            "description": "Thank-you screen id from settings.submissions.thankYouScreens."
                          }
                        },
                        "required": [
                          "type",
                          "screenId"
                        ],
                        "additionalProperties": false
                      },
                      {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "enum": [
                              "end"
                            ]
                          }
                        },
                        "required": [
                          "type"
                        ],
                        "additionalProperties": false
                      }
                    ],
                    "description": "Workflow destination. Use existing step ids or thank-you screen ids from formasty_get_form."
                  },
                  "thenAction": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "description": "Stable action id. Reuse existing ids when patching current workflow rules."
                      },
                      "variableId": {
                        "type": "string",
                        "description": "Workflow variable id to modify."
                      },
                      "operation": {
                        "type": "string",
                        "enum": [
                          "set",
                          "add",
                          "subtract",
                          "multiply",
                          "divide",
                          "clear",
                          "append",
                          "prepend"
                        ],
                        "description": "Workflow variable operation."
                      },
                      "source": {
                        "type": "object",
                        "properties": {
                          "sourceType": {
                            "type": "string",
                            "enum": [
                              "literal",
                              "field",
                              "hidden_field",
                              "variable"
                            ],
                            "description": "Where the workflow variable action should read its value from."
                          },
                          "sourceId": {
                            "type": "string",
                            "description": "Hidden field key or variable id depending on sourceType. For field sources, prefer fieldId; sourceId is accepted as a compatibility alias."
                          },
                          "fieldId": {
                            "type": "string",
                            "description": "Field id when reading from a form field."
                          },
                          "target": {
                            "type": "object",
                            "properties": {
                              "subfieldKey": {
                                "type": "string",
                                "description": "Optional subfield key for structured values such as address parts."
                              },
                              "rowKey": {
                                "type": "string",
                                "description": "Optional matrix row key when a workflow condition targets a matrix row value."
                              }
                            },
                            "description": "Optional workflow target selector for structured field values.",
                            "additionalProperties": false
                          },
                          "value": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "number"
                              },
                              {
                                "type": "boolean"
                              },
                              {
                                "type": "null"
                              }
                            ],
                            "description": "Literal fallback value used when sourceType is literal."
                          }
                        },
                        "description": "Workflow variable action source. Reuse ids and targets from the current draft snapshot.",
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "id",
                      "variableId",
                      "operation"
                    ],
                    "description": "Workflow variable mutation attached to a rule or step action.",
                    "additionalProperties": false
                  },
                  "else": {
                    "oneOf": [
                      {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "enum": [
                              "step"
                            ]
                          },
                          "stepId": {
                            "type": "string",
                            "description": "Destination draft step id."
                          }
                        },
                        "required": [
                          "type",
                          "stepId"
                        ],
                        "additionalProperties": false
                      },
                      {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "enum": [
                              "thank_you"
                            ]
                          },
                          "screenId": {
                            "type": "string",
                            "description": "Thank-you screen id from settings.submissions.thankYouScreens."
                          }
                        },
                        "required": [
                          "type",
                          "screenId"
                        ],
                        "additionalProperties": false
                      },
                      {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "enum": [
                              "end"
                            ]
                          }
                        },
                        "required": [
                          "type"
                        ],
                        "additionalProperties": false
                      }
                    ],
                    "description": "Workflow destination. Use existing step ids or thank-you screen ids from formasty_get_form."
                  },
                  "priority": {
                    "type": "integer",
                    "description": "Lower numbers run first when multiple rules apply."
                  },
                  "stopProcessing": {
                    "type": "boolean",
                    "description": "Stop evaluating later rules after this one matches."
                  }
                },
                "required": [
                  "source",
                  "conditions",
                  "then"
                ],
                "description": "Workflow rule payload. Use existing ids from formasty_get_form whenever you are editing a current rule; omit id when creating a new rule. An empty conditions array creates an unconditional always-route.",
                "additionalProperties": false
              }
            },
            "fallback": {
              "type": "object",
              "properties": {},
              "description": "Per-step fallback routing keyed by step id.",
              "additionalProperties": {
                "oneOf": [
                  {
                    "type": "object",
                    "properties": {
                      "type": {
                        "type": "string",
                        "enum": [
                          "step"
                        ]
                      },
                      "stepId": {
                        "type": "string",
                        "description": "Destination draft step id."
                      }
                    },
                    "required": [
                      "type",
                      "stepId"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "object",
                    "properties": {
                      "type": {
                        "type": "string",
                        "enum": [
                          "thank_you"
                        ]
                      },
                      "screenId": {
                        "type": "string",
                        "description": "Thank-you screen id from settings.submissions.thankYouScreens."
                      }
                    },
                    "required": [
                      "type",
                      "screenId"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "object",
                    "properties": {
                      "type": {
                        "type": "string",
                        "enum": [
                          "end"
                        ]
                      }
                    },
                    "required": [
                      "type"
                    ],
                    "additionalProperties": false
                  }
                ],
                "description": "Workflow destination. Use existing step ids or thank-you screen ids from formasty_get_form."
              }
            },
            "stepActions": {
              "type": "object",
              "properties": {},
              "description": "Per-step workflow variable actions keyed by step id.",
              "additionalProperties": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "Stable action id. Reuse existing ids when patching current workflow rules."
                    },
                    "variableId": {
                      "type": "string",
                      "description": "Workflow variable id to modify."
                    },
                    "operation": {
                      "type": "string",
                      "enum": [
                        "set",
                        "add",
                        "subtract",
                        "multiply",
                        "divide",
                        "clear",
                        "append",
                        "prepend"
                      ],
                      "description": "Workflow variable operation."
                    },
                    "source": {
                      "type": "object",
                      "properties": {
                        "sourceType": {
                          "type": "string",
                          "enum": [
                            "literal",
                            "field",
                            "hidden_field",
                            "variable"
                          ],
                          "description": "Where the workflow variable action should read its value from."
                        },
                        "sourceId": {
                          "type": "string",
                          "description": "Hidden field key or variable id depending on sourceType. For field sources, prefer fieldId; sourceId is accepted as a compatibility alias."
                        },
                        "fieldId": {
                          "type": "string",
                          "description": "Field id when reading from a form field."
                        },
                        "target": {
                          "type": "object",
                          "properties": {
                            "subfieldKey": {
                              "type": "string",
                              "description": "Optional subfield key for structured values such as address parts."
                            },
                            "rowKey": {
                              "type": "string",
                              "description": "Optional matrix row key when a workflow condition targets a matrix row value."
                            }
                          },
                          "description": "Optional workflow target selector for structured field values.",
                          "additionalProperties": false
                        },
                        "value": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "number"
                            },
                            {
                              "type": "boolean"
                            },
                            {
                              "type": "null"
                            }
                          ],
                          "description": "Literal fallback value used when sourceType is literal."
                        }
                      },
                      "description": "Workflow variable action source. Reuse ids and targets from the current draft snapshot.",
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "id",
                    "variableId",
                    "operation"
                  ],
                  "description": "Workflow variable mutation attached to a rule or step action.",
                  "additionalProperties": false
                }
              }
            },
            "layout": {
              "type": "object",
              "properties": {
                "nodes": {
                  "type": "object",
                  "properties": {},
                  "additionalProperties": {
                    "type": "object",
                    "properties": {
                      "x": {
                        "type": "number"
                      },
                      "y": {
                        "type": "number"
                      }
                    },
                    "required": [
                      "x",
                      "y"
                    ],
                    "additionalProperties": false
                  }
                },
                "viewport": {
                  "type": "object",
                  "properties": {
                    "x": {
                      "type": "number"
                    },
                    "y": {
                      "type": "number"
                    },
                    "zoom": {
                      "type": "number"
                    }
                  },
                  "required": [
                    "x",
                    "y",
                    "zoom"
                  ],
                  "additionalProperties": false
                },
                "panX": {
                  "type": "number"
                },
                "panY": {
                  "type": "number"
                },
                "zoom": {
                  "type": "number"
                },
                "autoArranged": {
                  "type": "boolean"
                }
              },
              "description": "Workflow canvas layout metadata. Preserve existing values when you are not intentionally changing the layout.",
              "additionalProperties": false
            }
          },
          "required": [
            "version",
            "enabled",
            "rules"
          ],
          "description": "Full workflow schema. Reuse ids from the current draft when editing existing rules, conditions, groups, variables, or outcomes.",
          "additionalProperties": false
        },
        "quiz": {
          "oneOf": [
            {
              "type": "object",
              "properties": {
                "type": {
                  "type": "string",
                  "enum": [
                    "match"
                  ]
                },
                "mode": {
                  "type": "string",
                  "enum": [
                    "match",
                    "personality"
                  ]
                },
                "enabled": {
                  "type": "boolean"
                },
                "endings": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "screenId": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "screenId"
                    ],
                    "additionalProperties": false
                  }
                },
                "mappings": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "fieldId": {
                        "type": "string"
                      },
                      "optionId": {
                        "type": "string"
                      },
                      "optionValue": {
                        "type": "string"
                      },
                      "value": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "number"
                          },
                          {
                            "type": "boolean"
                          }
                        ]
                      },
                      "target": {
                        "type": "object",
                        "properties": {
                          "subfieldKey": {
                            "type": "string",
                            "description": "Optional subfield key for structured values such as address parts."
                          },
                          "rowKey": {
                            "type": "string",
                            "description": "Optional matrix row key when a workflow condition targets a matrix row value."
                          }
                        },
                        "description": "Optional workflow target selector for structured field values.",
                        "additionalProperties": false
                      },
                      "screenId": {
                        "type": "string"
                      },
                      "weight": {
                        "type": "number"
                      }
                    },
                    "required": [
                      "id",
                      "fieldId",
                      "screenId"
                    ],
                    "additionalProperties": false
                  }
                }
              },
              "required": [
                "type",
                "enabled",
                "endings",
                "mappings"
              ],
              "description": "Optional recommendation/personality quiz configuration.",
              "additionalProperties": false
            },
            {
              "type": "object",
              "properties": {
                "type": {
                  "type": "string",
                  "enum": [
                    "score"
                  ]
                },
                "enabled": {
                  "type": "boolean"
                },
                "endings": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "screenId": {
                        "type": "string"
                      },
                      "minScore": {
                        "type": "number"
                      },
                      "maxScore": {
                        "type": "number"
                      }
                    },
                    "required": [
                      "screenId"
                    ],
                    "additionalProperties": false
                  }
                },
                "mappings": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "fieldId": {
                        "type": "string"
                      },
                      "optionId": {
                        "type": "string"
                      },
                      "optionValue": {
                        "type": "string"
                      },
                      "value": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "number"
                          },
                          {
                            "type": "boolean"
                          }
                        ]
                      },
                      "target": {
                        "type": "object",
                        "properties": {
                          "subfieldKey": {
                            "type": "string",
                            "description": "Optional subfield key for structured values such as address parts."
                          },
                          "rowKey": {
                            "type": "string",
                            "description": "Optional matrix row key when a workflow condition targets a matrix row value."
                          }
                        },
                        "description": "Optional workflow target selector for structured field values.",
                        "additionalProperties": false
                      },
                      "score": {
                        "type": "number"
                      }
                    },
                    "required": [
                      "id",
                      "fieldId",
                      "score"
                    ],
                    "additionalProperties": false
                  }
                },
                "qualification": {
                  "type": "object",
                  "properties": {
                    "enabled": {
                      "type": "boolean"
                    },
                    "tiers": {
                      "type": "array",
                      "minItems": 2,
                      "maxItems": 6,
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "label": {
                            "type": "string"
                          },
                          "color": {
                            "type": "string",
                            "pattern": "^#[0-9a-fA-F]{6}$",
                            "description": "Optional hex color in #RRGGBB format, matching the builder validation."
                          },
                          "minScore": {
                            "type": "number"
                          }
                        },
                        "required": [
                          "id",
                          "label",
                          "minScore"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "enabled",
                    "tiers"
                  ],
                  "description": "Optional Business-tier lead qualification tiers. Each tier classifies the computed score into a labeled lead tier when its minScore threshold is met. Requires Business or an active trial.",
                  "additionalProperties": false
                }
              },
              "required": [
                "type",
                "enabled",
                "endings",
                "mappings"
              ],
              "description": "Optional score quiz configuration. Use ending minScore/maxScore ranges to resolve the result.",
              "additionalProperties": false
            }
          ],
          "description": "Optional quiz configuration. Use type=match for recommendation/personality quizzes or type=score for score ranges."
        },
        "poll": {
          "type": "object",
          "properties": {
            "enabled": {
              "type": "boolean"
            },
            "resultsVisibility": {
              "type": "string",
              "enum": [
                "after_vote",
                "hidden"
              ],
              "description": "Whether aggregate poll results are shown after voting or kept hidden."
            }
          },
          "required": [
            "enabled",
            "resultsVisibility"
          ],
          "description": "Optional poll configuration. Poll publishing is subject to the current workspace plan.",
          "additionalProperties": false
        }
      },
      "required": [
        "version",
        "steps",
        "settings",
        "theme",
        "workflow"
      ],
      "description": "Full draft schema contract. Use the exact structure returned by formasty_get_form().form.draftSchema when replacing the whole draft. New forms should keep a statement-only welcome screen before respondent fields.",
      "additionalProperties": false
    },
    "FormSummary": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "id",
        "workspace_id",
        "title",
        "status",
        "draft_revision",
        "published_draft_revision",
        "draft_updated_at",
        "public_url"
      ],
      "properties": {
        "id": {
          "type": "string"
        },
        "workspace_id": {
          "type": "string"
        },
        "title": {
          "type": "string"
        },
        "status": {
          "type": "string",
          "enum": [
            "draft",
            "published"
          ]
        },
        "draft_revision": {
          "type": "integer",
          "minimum": 0
        },
        "published_draft_revision": {
          "type": [
            "integer",
            "null"
          ],
          "minimum": 0,
          "description": "Draft revision currently represented by the published snapshot, or null for an unpublished or legacy snapshot."
        },
        "draft_updated_at": {
          "type": "integer"
        },
        "public_url": {
          "type": [
            "string",
            "null"
          ]
        },
        "public_id": {
          "type": "string"
        },
        "slug": {
          "type": [
            "string",
            "null"
          ]
        },
        "plan": {
          "type": "string"
        },
        "workspace_role": {
          "type": "string"
        },
        "permissions": {
          "type": "object",
          "additionalProperties": {
            "type": "boolean"
          }
        },
        "plan_access": {
          "type": "object",
          "additionalProperties": true
        },
        "is_shared": {
          "type": "boolean"
        },
        "shared_member_count": {
          "type": "integer"
        },
        "responses_count": {
          "type": "integer"
        },
        "views_count": {
          "type": [
            "integer",
            "null"
          ]
        },
        "starts_count": {
          "type": [
            "integer",
            "null"
          ]
        },
        "completions_count": {
          "type": [
            "integer",
            "null"
          ]
        },
        "schema_version": {
          "type": "integer"
        },
        "published_version": {
          "type": "integer"
        },
        "published_at": {
          "type": [
            "string",
            "null"
          ]
        },
        "created_at": {
          "type": "integer"
        },
        "updated_at": {
          "type": "integer"
        }
      }
    }
  }
}