Skip to Content

ForumVotesApi

All URIs are relative to https://business.apis.kesk.app/v1 

MethodHTTP requestDescription
addOrUpdateForumVotePOST /community/votesCast or update a vote on forum content
getForumVoteCountsGET /community/votes/target/{target_id}/{target_type}Retrieve vote counts for forum content
removeForumVoteDELETE /community/votesRemove 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

NameTypeDescriptionNotes
AddVoteRequestAddVoteRequestVote details including target ID, target type (post/comment), and vote type (upvote/downvote)

Return type

VoteResponse

Authorization

JwtAuthScheme

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

NameTypeDescriptionNotes
target_idLongUnique identifier of the post or comment[default to null]
target_typeCommunityVoteTargetTypeType of content being queried (Post or Comment)[default to null] [enum: Post, Comment]

Return type

VoteCountResponse

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

NameTypeDescriptionNotes
RemoveVoteRequestRemoveVoteRequestVote removal details including target ID and target type (post/comment)

Return type

EmptyResponse

Authorization

JwtAuthScheme

HTTP request headers

  • Content-Type: application/json; charset=utf-8
  • Accept: application/json; charset=utf-8