ForumVotesApi
All URIs are relative to https://business.apis.kesk.app/v1
| Method | HTTP request | Description |
|---|---|---|
| addOrUpdateForumVote | POST /community/votes | Cast or update a vote on forum content |
| getForumVoteCounts | GET /community/votes/target/{target_id}/{target_type} | Retrieve vote counts for forum content |
| removeForumVote | DELETE /community/votes | Remove a vote from forum content |
addOrUpdateForumVote
VoteResponse addOrUpdateForumVote(AddVoteRequest)
Cast or update a vote on forum content
Allows community members to upvote or downvote posts and comments. If the user has already voted on the target, their vote type will be updated. Returns 201 Created for new votes and 200 OK for updated votes. Requires ‘forum.votes.cast’ permission.
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| AddVoteRequest | AddVoteRequest | Vote details including target ID, target type (post/comment), and vote type (upvote/downvote) |
Return type
Authorization
HTTP request headers
- Content-Type: application/json; charset=utf-8
- Accept: application/json; charset=utf-8
getForumVoteCounts
VoteCountResponse getForumVoteCounts(target_id, target_type)
Retrieve vote counts for forum content
Returns aggregated voting statistics including total upvotes, downvotes, and net score for a specific post or comment. This endpoint is public and does not require authentication, allowing anyone to view community sentiment on forum content.
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| target_id | Long | Unique identifier of the post or comment | [default to null] |
| target_type | CommunityVoteTargetType | Type of content being queried (Post or Comment) | [default to null] [enum: Post, Comment] |
Return type
Authorization
No authorization required
HTTP request headers
- Content-Type: Not defined
- Accept: application/json; charset=utf-8
removeForumVote
EmptyResponse removeForumVote(RemoveVoteRequest)
Remove a vote from forum content
Allows community members to retract their vote from a post or comment. Returns success if the vote was found and removed, or 404 if no vote exists. This enables users to return content to a neutral state without choosing a different vote type.
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| RemoveVoteRequest | RemoveVoteRequest | Vote removal details including target ID and target type (post/comment) |
Return type
Authorization
HTTP request headers
- Content-Type: application/json; charset=utf-8
- Accept: application/json; charset=utf-8