Import forms with JSON
Prepare a petition or poll as JSON and review the imported draft before publishing.
How to import JSON
- Download an example below, or use a file someone has shared with you. Save it as a UTF-8 text file ending in .json.
- In the app, open the petition or poll creator that matches the file type.
- Open the import selector using the upload icon, choose “Import JSON form” and select your file.
- Confirm replacing the included draft fields. Check the content, tags, duration, geographical scope, selected group and any image.
- Edit as needed, then use the normal publication review to publish. Importing alone does not publish the form.
Download an example
Edit the text and answer options in a text editor. Keep the field names and fixed values in English, even when your form is in another language.
{
"version": 1,
"type": "poll",
"title": "Choose our next community project",
"description": "Help us decide which community project to prioritise this year.",
"tags": [
"Environment"
],
"durationDays": 14,
"questions": [
{
"title": "Which project should we prioritise?",
"options": [
"Plant trees",
"Improve cycle paths",
"Create a community garden"
],
"type": "multipleChoice"
},
{
"title": "What would you improve, and why?",
"type": "text"
}
]
}Choice and written answers
Mix multipleChoice and text questions in the same poll. Multiple-choice questions let participants select one option. Text questions accept a written answer of up to 2,000 characters. Every question requires an answer. Written responses are visible only to the creator. Question type defaults to multipleChoice when omitted, so existing version 1 files still work.
JSON format · version 1
| Field | Rule |
|---|---|
version | Required: integer 1. |
type | Required: petition, poll or survey. Must match the editor; the poll editor also accepts survey. |
title | Required: 5–100 characters. |
description | Required: 20–1000 characters. |
questions | Required for polls/surveys; omit for petitions. 1–20 objects, each with title (1–200 characters) and an optional type: multipleChoice (default) or text. |
questions[].options | For multipleChoice: required list of 2–10 distinct strings, each 1–50 characters; answers must differ ignoring letter case. For text: omit options or use an empty list []. null is not accepted. |
tags | Optional: 1–3 distinct keys from the tag list below. |
durationDays | Optional: integer 1–42 (days). |
openUntilClosed | Optional: true or false. true keeps the form open until you close it. |
scopeType | Optional: global, countryUnion, country, stateOrRegion or city. |
countryUnion | Required for countryUnion scope: EU or UN. Omit for every other scope. |
Check your publication settings
Omitted optional fields keep their current draft values. The selected group audience and petition image also stay unchanged. Geography comes from your own profile; unavailable state or country-union scopes are rejected. Account IDs, votes, signatures, images and publication status cannot be imported.
Accepted tag keys
EnvironmentPoliticsEducationHealthInfrastructureEconomySocialTechnologyCultureSportsAnimal WelfareSafetyTrafficHousingHuman RightsEconomic JusticeLocal GovernmentRegional GovernmentFamilyEntertainmentAnimal RightsCriminal JusticeChildren’s RightsEducation ReformEducation InfrastructurePublic HealthMigration and IntegrationAccess to CareElections and Voting RightsFamily RightsClimate ProtectionWomen’s RightsConsumer RightsOther
Exporting results
For a finished poll, use its save or share action and choose CSV, JSON or PDF. Exports include choice labels and written answers in question order. You can include the form content as well. These are result reports, not reusable form files: to import a new draft, use the version 1 format above. Written responses are included in the file you save or share.
If the JSON import fails
The file must be one JSON object, at most 256 KiB. Use double quotes, no comments and no trailing commas. Unknown fields, unsupported versions and values outside the limits are rejected. Text is trimmed before length checks. Start with an example and check the field named in the error. If a scope is unavailable, update your profile or choose an available scope.