Vote for an Idea

You can use this API request to vote for an idea.

/services/v2/idea/[ideaId]/vote.json

The following parameters can be used in your vote for an idea request:

Other options: wrap, v1

🚧

Permissions & Notes:

  • You must have the custom Vote up idea permission under Custom Roles in the Advanced Editor.

    • This role is automatically added to the custom roles list with the install of the ideation plugin.
  • To use the userId parameter, and therefore vote as another user, you must have the ROLE_VOTE_OTHER_USER_IDEA permission.

    • This is a role that may not be automatically created. You may create this role in the admin interface under Users & Groups > Manage > Custom Roles. The name should be ROLE_VOTE_OTHER_USER_IDEA, and you choose the label.
  • This request was added in version 1.6.3.6.

Sample Request

A PUT vote for an idea request to vote for an idea (ideaId: 550) sent to https://apidocs.cloud.answerhub.com using a human-readable Username/Password (answerhub/test123) would look like this:

curl 
-u answerhub:test123 
-H "Accept: application/json" 
-H "Content-type: application/json" 
-X PUT 
-d '{"action": "voteup"}' "https://apidocs.cloud.answerhub.com/services/v2/idea/550/vote.json" -v

Expected Response

Successful Response:

  • HTTP Status 200 - OK
{
    "success": true,
    "result": {
        "score": 2
    }
}

Community User Interface Result

In this example, the idea already had 1 vote, after the request was sent, it increased to 2 votes.
You will see an increase in the vote count by 1 for that specific idea

Language
Authorization
Basic
base64
:
Click Try It! to start a request and see the response here!