Skip to main content
POST
/
v1
/
public
/
feedback-votes.create
curl --location --request POST 'https://api.yourapp.com/v1/public/feedback-votes.create' \
--header 'Authorization: Bearer SUBSCRIBER_JWT_TOKEN' \
--header 'Content-Type: application/json' \
--data-raw '{
  "feedbackId": "feedback-uuid"
}'
{
  "data": {
    "id": "vote-uuid",
    "feedbackId": "feedback-uuid",
    "subscriberId": "subscriber-uuid",
    "createdAt": "2024-01-15T10:30:00Z"
  },
  "totalVotes": 43
}

Authentication

Requires subscriber JWT token from login/identify.
Authorization: Bearer SUBSCRIBER_JWT_TOKEN

Request Body

feedbackId
string
required
The feedback ID to vote on

Response

data
object
Created vote object
totalVotes
number
Updated total vote count for this feedback
curl --location --request POST 'https://api.yourapp.com/v1/public/feedback-votes.create' \
--header 'Authorization: Bearer SUBSCRIBER_JWT_TOKEN' \
--header 'Content-Type: application/json' \
--data-raw '{
  "feedbackId": "feedback-uuid"
}'
{
  "data": {
    "id": "vote-uuid",
    "feedbackId": "feedback-uuid",
    "subscriberId": "subscriber-uuid",
    "createdAt": "2024-01-15T10:30:00Z"
  },
  "totalVotes": 43
}

Behavior

  • One Vote Per User: Each subscriber can only vote once per feedback
  • Duplicate Prevention: Returns existing vote if already voted
  • Vote Count Update: Feedback vote count incremented automatically
  • Notifications: May trigger notifications to feedback creator

Use Cases

  • User Engagement: Allow users to upvote feedback they support
  • Prioritization: Use votes to gauge feature demand
  • Popular Feedback: Sort feedback by vote count

Notes

  • Requires valid subscriber JWT token
  • Returns 409 if user has already voted (use delete to unvote first)
  • Vote count updates immediately
  • Triggers webhook events if configured