Skip to content

๐Ÿ—ณ๏ธ 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" }