Create Templates
How to build valid JSON templates for import.
Template Structure
Import expects a template object with a questions array.
- name (string) – template name.
- description (string) – short description.
- questions (array) – list of questions.
- version (string, optional) – version number.
Required Fields by Question Type
Most types only need the base fields. Selection and file questions require extra fields.
| Type | Required extra fields | Format |
|---|---|---|
| select | options | ["Option 1", "Option 2"] |
| multiselect | options | ["Option 1", "Option 2"] |
| file | fileConfig | {"allowedFileTypes": ["image/*"], "maxFileSizeMB": 25, "maxFiles": 3} |
| All others | None | Base fields only. |
JSON Examples
These examples show how finished JSON files must look.
Copied
{
"name": "Project Name",
"description": "Short text input",
"questions": [
{
"questionText": "What is the project name?",
"questionType": "text",
"required": true
}
]
}