How to Upvote or Downvote Questions via API
Track and influence question relevance programmatically
Helpjuice allows you to upvote or downvote questions using the API. This is useful for tracking which questions are most helpful or identifying content that may need improvement. Using these endpoints, you can integrate voting directly into your custom workflows, dashboards, or automation tools.
In this article, you’ll learn:
- How to upvote questions via API
- How to downvote questions via API
- How to interpret responses from the endpoints
- Best practices for using question votes in your workflows
API Endpoints for Voting
Use the following endpoints to register votes on questions:
-
Upvote a question:
PUT /api/questions/ID/upvote
-
Downvoate a question:
PUT /api/questions/ID/downvote
Both endpoints return an empty response with status OK to confirm the action was successful.
How to Use in Practice
- Replace ID in the endpoint URL with the question’s unique ID. For a list of IDs, see How To Retrieve Questions Through API.
- Send a PUT request using your preferred HTTP client (curl, Postman, or code).
- Confirm the response returns status OK to ensure the vote was registered.
Best Practices
- Use voting to highlight high-value questions for your users.
- Integrate voting metrics into dashboards to analyze content performance.
- Ensure proper API authentication to prevent unauthorized votes.