Overview
Terra supports importing and exporting forms as JSON, enabling:- Backup and restore — Save form schemas for safekeeping
- Migration — Import forms from legacy systems
- Sharing — Transfer forms between Terra instances
- Version control — Track form changes in Git
Exporting Forms
From the Dashboard
- Navigate to Forms and open the form you want to export
- Go to Settings (gear icon)
- Scroll to the Export Form section
- Click Export as JSON
- The form schema downloads as
{form-slug}.json
Export Contents
The exported JSON includes the complete form configuration:Exported forms include all translations, field configurations, and display settings. Submission data is never included in exports.
Importing Forms
From the Dashboard
- Navigate to the Forms page
- Click the Import button (next to “Create Form”)
- Paste your JSON into the text area
- Click Import Form
- The imported form opens in the builder
Supported Formats
Terra auto-detects and transforms these formats:| Format | Description | Auto-Transform |
|---|---|---|
| Terra JSON | Native Terra export | ✅ Direct import |
| Legacy JSON | External system format (see below) | ✅ Automatic conversion |
Legacy Format Support
Terra can import forms from external systems that use the following structure:Type Mapping
| Legacy Type | Terra Type | Notes |
|---|---|---|
ChoiceQuestion (single) | choice | Dropdown or radio |
ChoiceQuestion (multiple) | multiselect | Checkboxes |
TextQuestion | text | Short text |
TextQuestion (multiline) | textarea | Long text |
InfoQuestion | statement | Markdown content blocks |
GroupedQuestion | — | Flattened into elements |
AddressQuestion | address | Full address fields |
PhoneQuestion | phone | Phone with validation |
EmailQuestion | email | Email with validation |
DateQuestion | date | Date picker |
NumberQuestion | number | Numeric input |
FileQuestion | file | File upload |
Conditional Logic
Legacy conditions are automatically converted:Language Mapping
Legacy language codes are normalized:| Legacy Code | Terra Code |
|---|---|
en-US | en |
es-US | es |
Duplicate Forms
To create a copy of an existing form:- Open the form’s Settings
- Click Duplicate Form
- Choose a name for the copy
- Click Create Copy
Best Practices
Version Control
Version Control
Export forms before major changes. Store exports in Git alongside your codebase for audit trails.
Test Imports
Test Imports
Always import into a test environment first. Verify all fields, logic, and translations render correctly.
Translations
Translations
When importing multilingual forms, ensure all target languages are enabled in Terra before import.
Field Names
Field Names
Legacy imports preserve original field names when possible. Check for naming conflicts with existing forms.
Technical Reference
Server Actions
| Action | Description | Parameters |
|---|---|---|
exportFormAsJSON(formId) | Export form as JSON | formId: string |
importFormFromJSON(json, workspaceId?) | Import form from JSON | json: string, workspaceId?: string |
Transformer Functions
Component Architecture
Troubleshooting
Import fails with 'Invalid JSON'
Import fails with 'Invalid JSON'
Ensure the JSON is valid. Use a JSON validator to check for syntax errors like trailing commas or unquoted keys.
Fields missing after import
Fields missing after import
Some legacy field types may not have direct Terra equivalents. Check the console for transformation warnings.
Conditional logic not working
Conditional logic not working
Logic depends on field names matching exactly. Verify the referenced field exists and the name is spelled correctly.
Markdown not rendering
Markdown not rendering
Statement fields render markdown. Ensure the content uses standard markdown syntax (not HTML).