The registration phase is the only window during which you can add voters to the election. Each voter is identified by a unique email address. Once the election starts — viaDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/Crypto-Project-ENSTA/back-end/llms.txt
Use this file to discover all available pages before exploring further.
POST /voting/start-vote — the system emails N1 and N2 credentials to every registered address. No registrations are accepted after that point.
Before you begin
Registration must happen while the election is still in theregister state. Check the current state with GET /voting/vote-status before proceeding. If the status is already vote_started or vote_ended, voters can no longer be added.
Register a voter by email
Send a A successful registration returns HTTP
POST request to /voters/register with the voter’s email address in the request body.201:Handle duplicate email addresses
If the email address is already registered, the API returns HTTP Your registration script should treat a
409 instead of 201. The response body uses the same shape as a success response:409 as a no-op and continue with the next voter rather than aborting.Each email address must be unique in the system. Registering the same address twice returns
409 and does not create a duplicate record.What happens next
When you callPOST /voting/start-vote, the system immediately sends a credential email to every registered voter. Each email contains two one-time codes:
- N1 — used to authenticate the voter’s session before casting a ballot. It is consumed after the first successful
POST /voters/check_n1call. - N2 — used as the voter’s unique fingerprint when submitting and later verifying a ballot.