This endpoint completes the voting flow. You send your second credential (N2) and your ballot choice, and the server retrieves N1 from the session that was established byDocumentation 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.
/voters/check_n1. The ballot is passed through the RSA blind signature pipeline before being forwarded to the anonymizer service, ensuring your vote cannot be linked back to your identity. Once the vote is accepted, N1 is removed from the session so it cannot be reused.
The submitted vote passes through the RSA blind signature pipeline before it is stored. This ensures votes are unlinkable to individual voters even if the storage layer is compromised.
Prerequisites
You must call/voters/check_n1 in the same session before calling this endpoint. The server reads N1 from the session automatically. If N1 is not in the session the endpoint returns 403.
Request
POST /voters/submit_vote
Body
The second credential nonce from the voter’s credential email. Used together with N1 (retrieved from the session) to authenticate the ballot submission.
The voter’s ballot choice. Must be a recognised vote option string as defined by the active election configuration.
Response
"success" when the ballot was accepted and forwarded to the anonymizer.Human-readable confirmation, for example
"Vote submitted successfully and sent to anonymizer".HTTP status codes
| Code | Meaning |
|---|---|
200 | Ballot accepted and forwarded to the anonymizer. |
403 | N1 not found in the session — call /voters/check_n1 first, or re-call it if the session expired. |
400 | Invalid n2 format, unrecognised vote choice, or other validation failure. |
500 | Unexpected server-side error during ballot processing. |
N1 is cleared from the session as soon as the vote is accepted. This prevents double voting — if you call
/voters/submit_vote a second time in the same session it will return 403 until you go through /voters/check_n1 again.