Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/Crypto-Project-ENSTA/front-end/llms.txt

Use this file to discover all available pages before exploring further.

This admin endpoint performs a partial update of the election configuration. You can update any combination of the vote theme, the maximum number of voters, and the list of candidates — omit any field you do not want to change. The response always returns the full updated configuration object. A GET request to the same path (/config/voting-system-config) retrieves the current configuration without modification.
PATCH /config/voting-system-config

Request body

All fields are optional. Include only the fields you want to update.
vote_theme
string
The election topic or name displayed to voters (e.g. "Best Framework 2025"). Must be a non-empty string.
num_voters
number
The maximum number of voters permitted to register. Must be a positive integer (minimum 1).
choices
string[]
The list of candidate names voters can choose from. Must contain at least two non-empty strings.

Response fields

The endpoint returns the complete, updated configuration object.
vote_theme
string
The current election topic or name.
num_voters
number
The maximum number of voters permitted to register.
choices
string[]
The full list of candidate names for this election.

Validation rules

FieldConstraint
vote_themeNon-empty string
num_votersInteger, minimum 1
choicesArray of at least 2 non-empty strings

Example request

curl -X PATCH "$API_URL/config/voting-system-config" \
  -H "Authorization: Bearer $ADMIN_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"vote_theme": "Best Framework 2025", "num_voters": 100, "choices": ["React", "Vue", "Angular"]}'

Example response

{
  "vote_theme": "Best Framework 2025",
  "num_voters": 100,
  "choices": ["React", "Vue", "Angular"]
}
Configure the election settings before starting the vote. Changes made while voting is active may not affect ballots that are already in progress.

Build docs developers (and LLMs) love