Election JSON file

Election JSON file

This guide provides an overview of the json file that can be used to import an election configuration.

Other relevant guides are:

A template JSON file can also be found attached to this guide (it includes a folder with the images used in the template JSON file):

Important caveats

  • The order of the attributes shown in this guide reflects the way the JSON file is structured – for a successful importing process using this file, it is very important that this order is respected; otherwise, the importer fails.

  • This guide will show how the different attributes can be modified and will additionally link to the respective sections that explain the specific feature. This guide does not explain how each attribute behaves in the system – please refer to the relevant guide for that.

  • For any images used in the JSON file (e.g., logos or backgrounds), they must be stored in a folder. This folder, together with the JSON file, is then compressed into a zip file and is ready to be imported into the system. Note: The importer only accepts zip folders. See below for an example of the structure:

Screenshot 2026-03-05 at 10.09.04.png

Overview of the main attributes in the JSON file

Below is an overview of the main attributes that can appear in the JSON file, as well as which are required for different types of elections.

As a minimum, all elections need configurations, contests, and voter groups (ie. attributes: “election_attributes”, “contests_attributes”, “voter_groups_attributes”, and “contest_voter_groups_attributes”).

Attribute

Required for

Read more

Attribute

Required for

Read more

election_attributes

These are attributes referring to the general configuration of the election.

It is then needed for all election types.

Election JSON file

contests_attributes

These are attributes referring to the configuration of the ballots.

It is then needed for all election types.

Election JSON file

voting_rounds_attributes

These are attributes referring to the configuration of the voting rounds.

This set of attributes is mainly needed for Scheduled Voting.

Election JSON file

voter_groups_attributes

These are attributes referring to the voter groups.

It is then needed for all election types.

Election JSON file

slides_attributes

These are attributes referring to the configuration of slides used in Live Voting

As such, this set of attributes is mainly needed for Live Voting.

Election JSON file

contest_voter_groups_attributes

This set of attributes ensures that voter groups are linked to the contests.

It is then needed for all election types.

Election JSON file

contest_voting_rounds_attributes

This set of attributes ensures that voting rounds are linked to the contests.

It is mostly needed for Scheduled Voting.

Election JSON file

templates_attributes

These are attributes referring to the templates: emails or SMS sent out from the system.

It can be used for both live voting and scheduled voting, depending on whether that is needed for your election.

Election JSON file

translations_attributes

These are attributes referring to the translations of the election.

The system already has default translations for different languages.

It is only needed in the JSON file if you wish to make any concrete changes to the default translations.

Election JSON file

Table of Contents

This guide is structured to mimic the structure of the JSON file, which means that this guide can be read in tandem with looking at the JSON file.


1. Configuration

This section corresponds to all the features under Configuration, which in the JSON file are called “election_attributes”. Refer to theConfiguration page to read more about all the Configuration features.

Main attribute in the JSON file

Keys in the attribute

Values

Corresponding feature in Electa

Main attribute in the JSON file

Keys in the attribute

Values

Corresponding feature in Electa

(this is the outer layer, inside “election_attributes”)

(these are the inner layers, for each main attribute)

(these are the valid data types for each key, as well as the relevant options in the system)

(link to page in User Manual)

data

locales

 

ar/ ca/ cy/ da/ de/ en/ es/ fi/ fr/ is/ it/ nl/ pl/ pt/ ro/ ru/ sv/ ja/ zh/ ko

Configuration

curve_name

 

secp256k1/ secp256r1/ secp384r1/ secp521r1

 

election_client

redirect_method

disabled/ board/ custom_url/ sign-in

Configuration

hide_footer

true/false

utilize_screenspace

true/false

redirect_url

for each locale, input a URL

direct_token_public_key

input a string of your choice

stream

stream_url

input a URL

Configuration

theme

color

input a color code in hex format

Configuration

danger

input a color code in hex format

text_color

contrast/ white/ black

logo

input the name of the file uploaded as image

login_background

input the name of the file uploaded as image

  • if using gallery images, add a /backgrounds/ before the name of the image

splash_background

null/ self_upload/ from_gallery

default_slide_background

null/ self_upload/ from_gallery

login_selector

null/ self_upload/ from_gallery

login_gallery_background

input the name of the file uploaded as image

  • if using gallery images, add a /backgrounds/ before the name of the image

image_option

square/ passport

default_selector

null/ from_gallery/ self_upload

default_slide_gallery_background

input the name of the file uploaded as image

  • if using gallery images, add a /backgrounds/ before the name of the image

splash_selector

null/ from_gallery/ self_upload

splash_gallery_background

input the name of the file uploaded as image

  • if using gallery images, add a /backgrounds/ before the name of the image

election_codes

election_code_1_label

for each locale, input a text

Configuration

election_code_2_label

for each locale, input a text

election_code_3_label

for each locale, input a text

amount

input one number from 1 to 3

election_code_1_help

for each locale, input a text

election_code_1_placeholder

for each locale, input a text

login_link_prefill

  • leave empty for none: ""

  • input as many as needed from the options (if “amount” is 2, only two options can be added here): election_code_1 / election_code_2 / election_code_3

election_code_1_visibility

visible/ hidden

access

restrict_observer_access

true / false

Configuration

observer_name

input a string of your choice

observer_password

input a string of your choice

allowed_domains

input a URL

voter_counts

shown_counts

  • leave empty for none: ""

  • input as many as needed from the options: total_voters / active_voters / active_eligibles/ active_eligibles_weight

Configuration

progress_bar_shows

hidden/ vote_count_of_total_eligibles/ vote_count_of_active_eligibles/ vote_weight_of_total_eligibles/ vote_weight_of_active_eligibles

sign_up

enabled

true/false

Configuration

required

true/false

info

for each locale, input a text

schedule

enable_at

disable_at

ISO 8601 formatted timestamp (as the example below shows)

  • "2030-03-05T05:00:00.000+01:00"

Configuration

user_modules

comments

amendments

candidacies

voting_rounds

true/false

Configuration

e2e_verifiability

send_tracking_code_by_email

true/false

Configuration

download_voting_receipt

true/false

hide_benaloh

true/false

benaloh_challenge_timeout

number (integer)

hide_dbas

true/false

show_confirm_votes

true/false

election_verification_site

contact_url

for each locale, input a URL

Configuration

description

 

for each locale, input a text

Configuration

status

 

open/ closed/ scheduled

trust_mode

 

 

trusted

 

election_client_external_sign_in_url

 

 

for each locale, input a URL

Configuration: “External sign in URL”

voter_session_timeout

 

 

number (integer)

Configuration

voting_round_timeout

 

 

number (integer)

Configuration

manual_initialisation

 

 

true/false

Summary

internal_name

 

 

input a string of your choice

Configuration: Internal name

election_client_sign_in_method

 

 

election_codes/ external/ both

Configuration: “Sign in method”

theme__logo

 

 

input “file_ref:” followed by the name of the file uploaded as image

Configuration

theme__login_background

 

 

input “file_ref:” followed by the name of the file uploaded as image

locales

 

 

ar/ ca/ cy/ da/ de/ en/ es/ fi/ fr/ is/ it/ nl/ pl/ pt/ ro/ ru/ sv/ ja/ zh/ ko

Configuration

title

 

 

for each locale, input a text

Configuration: Title

2. Contest

This section corresponds to all features under Contest, which in the JSON file are called “contests_attributes”. Refer to the Contest page to read more about all the Contest features. Inside “contests_attributes”, there will be a set of attributes that are repeated for however many contests are needed in the election.

Main attribute in the JSON file

Keys in the attribute

Values

Corresponding feature in Electa

Main attribute in the JSON file

Keys in the attribute

Values

Corresponding feature in Electa

(this is the outer layer, inside “contests_attributes”)

(these are the inner layers, for each main attribute)

(these are the valid data types for each key, as well as the relevant options in the system)

(link to page in User Manual)

internal_name