# Set Public Vote

POST /api/v2/feedback/{projectId}/posts/{postId}/vote

Sets a visitor's vote on a public post. Voting also follows the post. Removing the vote keeps the follow. Public and unauthenticated. Do not call this as a fake visitor.

## Request

- postId: string, path, required — ID of the post.
- projectId: string, path, required — ID of the project that publishes the post.
- surface: feedback | roadmap, required — Which public portal the visitor is on. Votes and comments are tracked separately on each.
- visitorId: string, required — Random per-project id the portal stores in the visitor's browser.
- voted: boolean, required — Desired vote. true adds a vote and a follow. false removes the vote and keeps the follow.
- email: value — Email address so a follow can receive status-change mail. An empty string clears it.

## Response

- 200: Successful response
  - following: boolean, required — Whether this visitor follows the post.
  - voteCount: integer, required — Vote count after the change.
  - voted: boolean, required — Whether this visitor's vote is on.
- 400: Invalid input data
- 401: Authorization not provided
- 403: Insufficient access
- 500: Internal server error
