Call this endpoint to enroll a new voter before the election opens. You supply the voter’s email address, and the system records it in the database. On success the voter will receive credential emails containing the N1 and N2 codes they need for the voting flow. If the email is already registered the endpoint returns aDocumentation 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.
409 response with the same RegisterResponse shape so you can handle both cases uniformly.
Request
POST /voters/register
Body
The email address of the voter to register. Must be unique across all registered voters.
Response
Outcome of the registration attempt.
"success" when the voter was created; "error" when registration was rejected (for example, a duplicate email).Human-readable description of the result, such as
"Voter registered successfully" or "Email already exists".The email address of the voter concerned by this response.
HTTP status codes
| Code | Meaning |
|---|---|
201 | Voter registered successfully. |
409 | The email address is already enrolled in the system. |
400 | Registration failed due to a malformed request or an unexpected server error. |