๐ณ๏ธ Vote in a Poll
Endpoint: POST /api/forum/polls/{id}/vote
Auth Required: โ
Yes (Bearer Token)
Content-Type: application/json
๐ Description
This endpoint allows an authenticated citizen to cast a vote in an active poll.
Voting rules: - each citizen can vote only once per poll - votes cannot be changed after submission - voting is allowed only while the poll is active
This ensures fair and transparent civic participation.
๐ Authentication
Include the JWT access token in the Authorization header:
๐ Path Parameter
| Parameter | Type | Required | Description |
|---|---|---|---|
id |
UUID | โ | Unique poll ID |
๐งพ Request Body
```json { "option_id": "opt2" }