Import from JSON

You can create a new form by uploading a JSON file from the Forms list page — no need to build it field by field. This is useful for programmatic form generation, version-controlling form definitions, or migrating forms from another system.

If you want to edit an existing form's JSON directly inside the builder, use the JSON toggle in the form builder header instead.

How to import

  1. Go to Forms in the dashboard sidebar.
  2. Click the Import JSON button next to "New form".
  3. Select a .json file from your computer, or drag and drop it onto the button.
  4. A preview modal shows the form title, field count, group count, visibility, and status. Review the details.
  5. Click Import form. You will be redirected to the form builder where you can make further edits before publishing.

Imported forms are always created as Draft regardless of the status field in the JSON.

JSON schema

The import file uses the same flat structure as the in-builder JSON editor. Form metadata sits at the top level alongside a single fields array. Groups and rows are expressed as typed items inside that array rather than separate keys.

{
  "title":       string,                    // required
  "description": string | null,             // optional
  "visibility":  "PUBLIC" | "PRIVATE",      // default: "PUBLIC"
  "status":      "DRAFT" | "PUBLISHED",     // ignored on import — always Draft
  "expiresAt":   ISO 8601 datetime | null,  // optional
  "fields": [
    // ── Plain field ──────────────────────────────────────────────────────
    {
      "type":        FieldType,             // required — see table below
      "label":       string,                // required
      "placeholder": string,                // optional
      "required":    boolean,               // default: false
      "order":       number,                // optional — inferred from position
      "options": {                          // choice fields only
        "choices": [
          { "label": string, "value": string }
        ]
      }
    },
    // ── Side-by-side row ─────────────────────────────────────────────────
    {
      "type":  "ROWS",
      "label": string,
      "order": number,
      "rows":  [ /* plain fields */ ]
    },
    // ── Repeating group ───────────────────────────────────────────────────
    {
      "type":       "GROUP",
      "label":      string,
      "repeatable": boolean,
      "order":      number,
      "fields":     [ /* plain fields or ROWS items */ ]
    }
  ]
}

Supported field types

ValueDescription
SHORT_TEXTSingle-line text input
LONG_TEXTMulti-line textarea
MULTIPLE_CHOICERadio buttons — pick one
CHECKBOXESCheckboxes — pick many
DROPDOWNSelect element — pick one
DATEDate picker
EMAILEmail address input
NUMBERNumeric input
FILE_UPLOADFile picker
SECTION_HEADERVisual section divider (no answer collected)
COORDINATESLatitude + longitude pair

Full example

{
  "title": "Facility Registration",
  "description": "Register your node and its facilities.",
  "visibility": "PUBLIC",
  "fields": [
    {
      "type": "SHORT_TEXT",
      "label": "Node name",
      "required": true,
      "order": 1
    },
    {
      "type": "GROUP",
      "label": "Facility",
      "repeatable": true,
      "order": 2,
      "fields": [
        {
          "type": "SHORT_TEXT",
          "label": "Facility name",
          "required": true,
          "order": 1
        },
        {
          "type": "MULTIPLE_CHOICE",
          "label": "Imaging modality",
          "required": true,
          "order": 2,
          "options": {
            "choices": [
              { "label": "Light microscopy", "value": "light" },
              { "label": "Electron microscopy", "value": "electron" },
              { "label": "MRI", "value": "mri" }
            ]
          }
        },
        {
          "type": "ROWS",
          "label": "",
          "order": 3,
          "rows": [
            { "type": "SHORT_TEXT", "label": "City", "order": 1 },
            { "type": "COORDINATES", "label": "Location", "order": 2 }
          ]
        }
      ]
    }
  ]
}