{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/connections-icu/json-schema/connections-icu-workspace-form-create-input-schema.json",
  "title": "WorkspaceFormCreateInput",
  "description": "Form create input. POST requires name. A new form takes no answers until is_active is true.",
  "x-generated": "2026-11-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/connections-icu-product-openapi.yml#/components/schemas/WorkspaceFormCreateInput",
  "type": "object",
  "properties": {
    "name": {
      "type": "string"
    },
    "slug": {
      "type": "string",
      "description": "Public form slug."
    },
    "description": {
      "type": "string"
    },
    "fields_json": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "fieldKey",
          "fieldType"
        ],
        "properties": {
          "fieldKey": {
            "type": "string"
          },
          "fieldType": {
            "type": "string"
          },
          "label": {
            "type": "string"
          },
          "isRequired": {
            "type": "boolean"
          },
          "options": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "publicTally": {
            "type": "boolean",
            "description": "On a select (one choice) question: true lets anyone read the running count of each option at /public/forms/{formSlug}/tally?field={fieldKey}, one counted answer per voter (the email they gave), a new answer replaces the old. Use it for a vote on a site."
          }
        }
      },
      "description": "The questions, in order. fieldType is a form question type such as short_text, long_text, email, phone, select (one choice), multi_select, checkbox, number, date or rating; a wrong one is refused with the full list. Choice types need options. Needs an email or phone question: every answer must give one, except on a form with a publicTally choice question (a vote), where the email question may be optional (isRequired false) and a vote without one is counted by visitor. A website of your own can post to the form from a plain <form action=\"/_connections/form/<formSlug>\" method=\"post\">."
    },
    "success_message": {
      "type": "string"
    },
    "theme": {
      "type": "string",
      "enum": [
        "light",
        "dark",
        "paper",
        "skyline",
        "glass",
        "minimal",
        "confetti",
        "graphite",
        "neon",
        "luxe",
        "ink",
        "afterglow"
      ],
      "description": "Shared public page theme."
    },
    "self_notification_email": {
      "type": [
        "string",
        "null"
      ],
      "description": "Email a copy of every submission to this address. Empty string or null stops it."
    },
    "send_respondent_confirmation": {
      "type": "boolean",
      "description": "Email the respondent a receipt of their answers after they submit."
    },
    "slack_webhook_url": {
      "type": [
        "string",
        "null"
      ],
      "description": "https incoming-webhook URL that receives a summary of every submission."
    },
    "logo_url": {
      "type": [
        "string",
        "null"
      ],
      "description": "https URL of the logo shown at the top of the public form."
    },
    "cover_image_url": {
      "type": [
        "string",
        "null"
      ],
      "description": "https URL of the cover image above the public form."
    },
    "color_settings": {
      "type": [
        "object",
        "null"
      ],
      "description": "Page colors. Keys: background, text, accent, button, buttonText; each a CSS color of at most 32 characters.",
      "properties": {
        "background": {
          "type": "string"
        },
        "text": {
          "type": "string"
        },
        "accent": {
          "type": "string"
        },
        "button": {
          "type": "string"
        },
        "buttonText": {
          "type": "string"
        }
      }
    },
    "submit_button_label": {
      "type": [
        "string",
        "null"
      ],
      "maxLength": 80
    },
    "next_button_label": {
      "type": [
        "string",
        "null"
      ],
      "maxLength": 80
    },
    "back_button_label": {
      "type": [
        "string",
        "null"
      ],
      "maxLength": 80
    },
    "capture_partial_responses": {
      "type": "boolean",
      "description": "Keep half-finished answers for analytics. Off by default."
    },
    "search_indexing_enabled": {
      "type": "boolean",
      "description": "false asks search engines not to list the public form page. Default true."
    },
    "opens_at": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time",
      "description": "ISO 8601 time the form starts accepting submissions. Null or empty clears it."
    },
    "closes_at": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time",
      "description": "ISO 8601 time the form stops accepting submissions. Null or empty clears it."
    },
    "submission_limit": {
      "type": [
        "integer",
        "null"
      ],
      "minimum": 1,
      "description": "Stop accepting submissions after this many. Null removes the limit."
    },
    "prevent_duplicate_submissions": {
      "type": "string",
      "enum": [
        "off",
        "per_browser"
      ],
      "description": "per_browser allows one submission per browser; off allows repeats."
    },
    "contact_list_folder_id": {
      "type": [
        "string",
        "null"
      ],
      "format": "uuid",
      "description": "Contacts folder every submitter joins. Null or empty means no list."
    },
    "closed_message": {
      "type": [
        "string",
        "null"
      ],
      "maxLength": 2000,
      "description": "Shown instead of the form while it is closed. Empty string or null clears it."
    },
    "is_active": {
      "type": "boolean",
      "description": "false takes the public form offline."
    },
    "show_form_title": {
      "type": [
        "boolean",
        "null"
      ],
      "description": "false hides the title and description on the public page."
    },
    "redirect_url": {
      "type": [
        "string",
        "null"
      ],
      "description": "https URL the respondent is sent to after submitting. Empty string or null clears it."
    },
    "company_id": {
      "type": "string",
      "description": "PATCH only. Puts the form into the workspace this key is bound to, so its public page presents the company. Only the key workspace id is accepted."
    }
  }
}