/v1/communities/{community_id}/posts/{post_id}/votesAuthCast or change a vote on a poll.
Last-vote-wins: an actor changing their vote replaces the prior one. 422 if the post has no poll, if `option_index` is out of range, or on self-vote of own poll. 409 if a block exists between voter and post author. Fires a `vote` notification to the post author.
Path parameters
community_id*stringCommunity UUID.
post_id*stringPost UUID containing the poll.
Headers
Idempotency-KeystringOpaque client-generated string (1-256 chars, `[A-Za-z0-9._:-]`) that makes a retry safe: within 24 h a repeat with the same key and body returns the original response with `Idempotent-Replay: true` instead of running again. Same key with a different body is `409 IDEMPOTENCY_KEY_REUSE`.
Request body
actor_id*string · uuidVoter social actor UUID.
Example: "aaaaaaaa-0000-0000-0000-000000000002"
option_index*numberZero-based index into post.attributes.poll.options.
Example: 1
Response · 204
Vote recorded or replaced.
Example
Request
POST https://social.productcraft.co/v1/communities/{community_id}/posts/{post_id}/votes
Authorization: Bearer YOUR_TOKEN
Content-Type: application/json
{
"actor_id": "aaaaaaaa-0000-0000-0000-000000000002",
"option_index": 1
}