Interview Import Format

Mayetik can create a complete interview — metadata, questions, and branch rules — from a single JSON file. This document describes the format.

Two formats are accepted:

  • Native Mayetik JSON (described here) — minimal, human-writable, maps directly to the Mayetik data model.
  • SurveyJS JSON — automatically detected by the presence of a pages array. Types are mapped to Mayetik equivalents; unsupported types are skipped.

Quick start

Download one of the ready-made templates from the Import section on any interview list page:

TemplateDescription
interview-template.jsonFull-featured example showing all 16 question types
simple-survey.jsonMinimal 3-question survey — good starting point
branching-survey.jsonShows branch rules with multiple condition types

Open the template in any text editor, replace the example values, and upload it.


Top-level fields

{
  "title": "...",
  "description": "...",
  "language": "en",
  "stakeholderGroup": "...",
  "questions": [ ... ]
}
FieldTypeRequiredNotes
titlestringYesMust be unique within the project
descriptionstringNoShown to admins; not visible to participants
language"en" | "es"NoDefaults to "en"
stakeholderGroupstringNoUsed in project-level synthesis reports
questionsarrayYesAt least one question required

Imported interviews always start in draft status. Publish manually when ready.


Question fields

{
  "order": 1,
  "text": "...",
  "hint": "...",
  "type": "text",
  "required": false,
  "isTerminal": false,
  "options": null,
  "branchRules": []
}
FieldTypeRequiredNotes
orderinteger ≥ 1YesDisplay position; must be unique; used by branch rule targetOrder references
textstringYesThe question body shown to participants
hintstringNoHelper text shown below the question
typestringNoDefaults to "text". See table below
requiredbooleanNoDefaults to false
isTerminalbooleanNoDefaults to false. Ends the interview immediately after this question is answered
optionsobject | array | nullDepends on typeSee per-type details below
branchRulesarrayNoSee Branch rules section

Question types

text

Multi-line free-form text box. No options needed.

{ "order": 1, "text": "Describe your role", "type": "text" }

short_text

Single-line input with optional format validation.

{
  "order": 2,
  "text": "Employee ID",
  "type": "short_text",
  "options": {
    "patternKey": "alphanumeric",
    "pattern": "^[A-Za-z0-9]+$",
    "patternHint": "Letters and numbers only",
    "maxLength": 20,
    "placeholder": "e.g. EMP12345"
  }
}
OptionTypeNotes
maxLengthintegerMaximum characters allowed. Defaults to 64
placeholderstringGreyed-out hint text inside the input
patternKeystringNamed preset: none, numbers_only, letters_only, alphanumeric, phone, postal_code, custom
patternstringRegex pattern (used when patternKey is "custom")
patternHintstringError message shown when the pattern is not matched

multiple_choice

Participant selects exactly one option. options is a non-empty array of strings.

{
  "order": 3,
  "text": "Which team are you joining?",
  "type": "multiple_choice",
  "options": ["Engineering", "Product", "Design"]
}

yes_no

Two-option toggle (Yes / No). No options needed.

{ "order": 4, "text": "Do you have prior experience?", "type": "yes_no" }

Branch rule condition values for yes_no: use "true" for Yes, "false" for No.


multi_select

Participant selects one or more options. options is a non-empty array of strings.

{
  "order": 5,
  "text": "Select all that apply",
  "type": "multi_select",
  "options": ["Option A", "Option B", "Option C"]
}

rating_scale

Participant picks a number within a defined range.

{
  "order": 6,
  "text": "Rate your experience",
  "type": "rating_scale",
  "options": { "min": 1, "max": 5, "minLabel": "Poor", "maxLabel": "Excellent" }
}
OptionTypeRequired
minnumberYes
maxnumberYes
minLabelstringNo
maxLabelstringNo

number

Free-form numeric input. No options needed.

{ "order": 7, "text": "How many years of experience do you have?", "type": "number" }

slider

Drag-style range selector.

{
  "order": 8,
  "text": "How confident do you feel?",
  "type": "slider",
  "options": { "min": 0, "max": 100, "step": 5 }
}
OptionTypeRequired
minnumberYes
maxnumberYes
stepnumberNo (defaults to 1)

date

Date picker input. No options needed.

{ "order": 9, "text": "When did you start?", "type": "date" }

time

Time picker input. No options needed.

{ "order": 10, "text": "What time is your team stand-up?", "type": "time" }

email

Text input with email format validation. No options needed.

{ "order": 11, "text": "Work email address", "type": "email" }

address

Five-field US postal address form with optional USPS verification.

{
  "order": 12,
  "text": "Mailing address",
  "type": "address",
  "options": {
    "showStreet2": true,
    "requireStreet2": false,
    "requireCity": true,
    "requireState": true,
    "requireZip": true,
    "verify": true
  }
}

All options are booleans and default to true except showStreet2 (defaults to false) and requireStreet2 (defaults to false). Set "verify": false to skip USPS validation.


signature

Typed electronic signature with a handwriting font picker and an automatic timestamp. No options needed.

{ "order": 13, "text": "Sign to confirm your responses", "type": "signature", "required": true, "isTerminal": true }

file_upload

File attachment input. No options needed.

{ "order": 14, "text": "Upload your CV", "type": "file_upload" }

location

Location input. No options needed.

{ "order": 15, "text": "Where are you based?", "type": "location" }

ranking

Drag-to-rank list. options is a non-empty array of strings.

{
  "order": 16,
  "text": "Rank these from most to least important",
  "type": "ranking",
  "options": ["Speed", "Reliability", "Price", "Support"]
}

Branch rules

Branch rules route participants to a different question when their answer matches a condition. They are attached to individual questions and evaluated in priority order.

{
  "order": 1,
  "text": "Are you a current customer?",
  "type": "yes_no",
  "branchRules": [
    {
      "conditionType": "equals",
      "conditionValue": "true",
      "targetOrder": 5,
      "priority": 0
    }
  ]
}
FieldTypeRequiredNotes
conditionTypestringYesSee table below
conditionValuestringYesThe value to compare against (always a string, even for numbers)
targetOrderintegerYesThe order of the question to jump to. Must be greater than the source question's order (forward jumps only)
priorityintegerNoHigher numbers are evaluated first. Defaults to 0

Condition types

Both the full name and the short alias are accepted.

Short aliasFull nameApplicable types
eqequalsall
neqnot_equalsall
ltless_thannumeric, date, time, slider, rating_scale
lteless_than_or_equalnumeric, date, time, slider, rating_scale
gtgreater_thannumeric, date, time, slider, rating_scale
gtegreater_than_or_equalnumeric, date, time, slider, rating_scale
containstext, short_text, multi_select
not_emptytext, short_text, address, signature
is_emptytext, short_text, address, signature

Condition values by type

Question typeExample conditionValue
yes_no"true" or "false"
multiple_choice"Engineering" (exact option label)
multi_select"Option A" (contains this option)
rating_scale, number, slider"4" (numeric, as a string)
date"2025-01-01" (ISO 8601 date)
time"09:00" (HH:MM)
text, short_textAny string for equals/contains

SurveyJS format

If your JSON has a pages array, Mayetik treats it as SurveyJS format and converts it automatically before import. Question types are mapped as follows:

SurveyJS typeMayetik type
text, comment, expressiontext
radiogroup, dropdownmultiple_choice
checkboxmulti_select
ratingrating_scale
booleanyes_no
anything elseskipped (a warning is shown)

SurveyJS visibleIf expressions are not imported. Branch rules must be added manually after import.


Error handling

If the file fails validation, the specific error is shown inline — no interview is created. Common errors:

ErrorFix
Invalid JSONCheck for trailing commas, mismatched brackets, or unquoted keys
order values must be uniqueEach question must have a different order number
targetOrder X does not match any question orderA branch rule references an order that doesn't exist in the file
rating_scale requires options: { min, max }Add the options object with min and max fields
An interview with this title already existsChange the title or delete the existing interview

Known limitations (v1)

  • Import always creates a new draft interview — it cannot update or merge with an existing one.
  • The file_upload and location question types are created correctly but participant-facing UI for those types is not yet fully implemented.
  • SurveyJS visibleIf expressions are not converted to branch rules.
  • No image or media question types are supported.