Cast a vote on a polst.
POST /polsts/{slug}/votes
POST
/polsts/{slug}/votes
Accepts X-Device-Id (anonymous) or a bearer token carrying the vote scope. Rate-limited at 10 votes per minute per caller. The DB upsert on (polstId, deviceId) prevents double-counting, so the endpoint is naturally idempotent without a client-supplied key.
Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ” slug
required
Polst slug or UUID.
string
Polst slug or UUID.
Request Body required
Section titled “Request Body required ”object
option
required
string
Responses
Section titled “ Responses ”Vote recorded.
object
data
required
object
tallies
required
object
optionA
required
integer
optionB
required
integer
total
required
integer
votedAt
required
string format: date-time
Missing bearer and X-Device-Id.
Bearer token lacks the vote scope.
Polst not found.
Conflict: either POLST_CLOSED (polst voting window is closed) or VOTE_ALREADY_CAST (caller has already voted on this polst — error.details.existingVote echoes the original vote).
Request body failed validation.
Rate limit exceeded.