Skip to content

Question JSON schema

This is the English structure reference for the Questions JSON Editor. The same file is what Structure downloads inside the form editor. The in-app download uses Arabic or English based on the admin language.

Attach this file to any AI model to generate questions in bulk, then paste the result into the JSON editor and click Apply and save. See Generate questions with AI.

The editor expects a JSON array of question objects. Array order is the order of questions on the form.

Using this file with an AI model

Attach this file to any AI model and describe the form you need. Paste the result into the JSON editor in Gohorto and click Apply and save to insert all questions at once.

Instructions for the AI model:

  • Return only a JSON array that follows this structure.
  • Omit "id" on every question and choice (they are new).
  • Fill every requested language in title, help, and labels.
  • For a quiz, use only "radio" and "checkbox", set points on choices, and put reading text in a "section".

Editing rules

  • Keep "id" to update an existing question (or choice / matrix column).
  • Omit "id" to add a new question (or choice / column).
  • Remove an object from the array to delete it when you save.
  • Quizzes only allow "radio" and "checkbox".

Language fields (title, help, labels) are objects keyed by language code, for example "ar" and "en".


Question object

Field Type Required Notes
id string / number no Existing question id. Omit for a new question.
type string yes See types below. Numeric type ids are also accepted.
title object yes { "ar": "...", "en": "..." }
help object no Same shape as title.
required boolean no Default false.
shuffle boolean no Shuffle choices (radio / checkbox).
unique boolean no Unique answer.
identifier boolean no Use this answer as the replier identifier.
validate boolean no Turn on extra validation (textbox).
input_type string no Text input group: "1" number, "2" specific, "3" length, "4" date.
validation object no { "rule": "...", "rule_value": "..." }
matrix_checkboxes boolean no Matrix only: allow multiple selections per row.
choices array yes for radio / checkbox Rows for matrix.
columns array matrix Scale / column headers.

Types

type Meaning Extra fields
radio Single choice choices
checkbox Multiple choice choices
textbox Short text input_type, validation, identifier, unique
textarea Paragraph
file File upload
matrix Matrix / rating scale choices (rows), columns (scale), matrix_checkboxes
section Section break

Validation rules

Use with "validate": true on a textbox.

rule Needs rule_value Typical input_type
min_value / max_value yes "1" number, "4" date
email / number / url / date no "2" specific
min_length / max_length yes "3" length
min_selection / max_selection yes checkbox (when used)

Choice / column object

Used in choices and (for matrix) columns.

Field Type Required Notes
id string / number no Keep to update. Omit to add. Do not reuse another choice's id.
labels object yes { "ar": "...", "en": "..." } — at least one language must be non-empty.
points number no Quiz / matrix scoring.

Examples

Radio (update existing + add a new choice)

[
  {
    "id": "12",
    "type": "radio",
    "title": {
      "ar": "ما الخبرات الأساسية؟",
      "en": "What are the core skills?"
    },
    "help": {
      "ar": "",
      "en": ""
    },
    "required": true,
    "shuffle": false,
    "choices": [
      {
        "id": "40",
        "labels": { "ar": "خيار 1", "en": "Choice 1" },
        "points": 1
      },
      {
        "labels": { "ar": "خيار جديد", "en": "New choice" },
        "points": 0
      }
    ]
  }
]

Checkbox

{
  "type": "checkbox",
  "title": { "ar": "", "en": "Select all that apply" },
  "help": { "ar": "", "en": "" },
  "required": true,
  "choices": [
    { "labels": { "ar": "", "en": "Option A" }, "points": 1 },
    { "labels": { "ar": "", "en": "Option B" }, "points": 1 }
  ]
}

Textbox with email validation

{
  "type": "textbox",
  "title": { "ar": "", "en": "Email" },
  "help": { "ar": "", "en": "" },
  "required": true,
  "unique": true,
  "identifier": true,
  "validate": true,
  "input_type": "2",
  "validation": { "rule": "email" }
}

Matrix

{
  "type": "matrix",
  "title": { "ar": "", "en": "Rate the following" },
  "help": { "ar": "", "en": "" },
  "required": true,
  "matrix_checkboxes": false,
  "choices": [
    { "labels": { "ar": "", "en": "Quality" } },
    { "labels": { "ar": "", "en": "Speed" } }
  ],
  "columns": [
    { "labels": { "ar": "", "en": "Poor" }, "points": 1 },
    { "labels": { "ar": "", "en": "Good" }, "points": 2 },
    { "labels": { "ar": "", "en": "Excellent" }, "points": 3 }
  ]
}

Section

help is the optional multilingual subtitle shown under the section title.

{
  "type": "section",
  "title": { "ar": "القسم الأول", "en": "Part 1" },
  "help": { "ar": "وصف موجز لهذا القسم", "en": "A short description of this section" }
}