Cast a vote on a polst.
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 ”Polst slug or UUID.
Polst slug or UUID.
Request Body required
Section titled “Request Body required ”object
Responses
Section titled “ Responses ”Vote recorded.
object
object
object
Caller identity is malformed: X-Device-Id is not a v4 UUID, or the bearer token’s subject is not a v4 UUID.
Missing bearer and X-Device-Id, or the bearer token’s subject references an unknown device.
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.