DocumentationImport formsJSON

Import forms with JSON

Prepare a petition or poll as JSON and review the imported draft before publishing.

How to import JSON

  1. Download an example below, or use a file someone has shared with you. Save it as a UTF-8 text file ending in .json.
  2. In the app, open the petition or poll creator that matches the file type.
  3. Open the import selector using the upload icon, choose “Import JSON form” and select your file.
  4. Confirm replacing the included draft fields. Check the content, tags, duration, geographical scope, selected group and any image.
  5. 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

FieldRule
versionRequired: integer 1.
typeRequired: petition, poll or survey. Must match the editor; the poll editor also accepts survey.
titleRequired: 5–100 characters.
descriptionRequired: 20–1000 characters.
questionsRequired for polls/surveys; omit for petitions. 1–20 objects, each with title (1–200 characters) and an optional type: multipleChoice (default) or text.
questions[].optionsFor 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.
tagsOptional: 1–3 distinct keys from the tag list below.
durationDaysOptional: integer 1–42 (days).
openUntilClosedOptional: true or false. true keeps the form open until you close it.
scopeTypeOptional: global, countryUnion, country, stateOrRegion or city.
countryUnionRequired 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

  • Environment
  • Politics
  • Education
  • Health
  • Infrastructure
  • Economy
  • Social
  • Technology
  • Culture
  • Sports
  • Animal Welfare
  • Safety
  • Traffic
  • Housing
  • Human Rights
  • Economic Justice
  • Local Government
  • Regional Government
  • Family
  • Entertainment
  • Animal Rights
  • Criminal Justice
  • Children’s Rights
  • Education Reform
  • Education Infrastructure
  • Public Health
  • Migration and Integration
  • Access to Care
  • Elections and Voting Rights
  • Family Rights
  • Climate Protection
  • Women’s Rights
  • Consumer Rights
  • Other

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.