/v1/communities/{community_id}/posts/{post_id}/poll-resultsAuthAggregate poll results for a post.
Returns counts per option, zero-filling options that received no votes, plus `total_votes`. The `question` and option `label` strings are echoed from `post.attributes.poll`.
Path parameters
community_id*stringCommunity UUID.
post_id*stringPost UUID containing the poll.
Response · 200 Aggregated poll results.
post_id*string · uuidPost UUID the poll lives on.
Example: "bbbbbbbb-0000-0000-0000-000000000001"
question*stringPoll question, copied from post.attributes.poll.question.
Example: "Best dev tool?"
options*arrayEach option with its vote count.
total_votes*numberSum of counts across every option.
Example: 67
Example
Request
GET https://social.productcraft.co/v1/communities/{community_id}/posts/{post_id}/poll-results
Authorization: Bearer YOUR_TOKENResponse
{
"post_id": "bbbbbbbb-0000-0000-0000-000000000001",
"question": "Best dev tool?",
"options": [
{
"index": 0,
"label": "VS Code",
"count": 42
}
],
"total_votes": 67
}