curl --location --request POST 'https://api.userorbit.com/v1/public/feedback-votes.create' \
--header 'Authorization: Bearer SUBSCRIBER_JWT_TOKEN' \
--header 'Content-Type: application/json' \
--data-raw '{
"feedbackId": "feedback-uuid"
}'
const response = await fetch('https://api.userorbit.com/v1/public/feedback-votes.create', {
method: 'POST',
headers: {
'Authorization': 'Bearer SUBSCRIBER_JWT_TOKEN',
'Content-Type': 'application/json'
},
body: JSON.stringify({
feedbackId: 'feedback-uuid'
})
});
const { data: vote, totalVotes } = await response.json();
console.log(`Vote created! Total votes: ${totalVotes}`);
import requests
response = requests.post(
'https://api.userorbit.com/v1/public/feedback-votes.create',
headers={
'Authorization': 'Bearer SUBSCRIBER_JWT_TOKEN',
'Content-Type': 'application/json'
},
json={
'feedbackId': 'feedback-uuid'
}
)
result = response.json()
vote = result['data']
total_votes = result['totalVotes']
print(f'Vote created! Total votes: {total_votes}')
{
"data": {
"id": "vote-uuid",
"feedbackId": "feedback-uuid",
"subscriberId": "subscriber-uuid",
"createdAt": "2024-01-15T10:30:00Z"
},
"totalVotes": 43
}
Votes
Vote on Feedback
Cast a vote on a feedback item. Requires subscriber authentication. One vote per subscriber.
POST
/
v1
/
public
/
feedback-votes.create
curl --location --request POST 'https://api.userorbit.com/v1/public/feedback-votes.create' \
--header 'Authorization: Bearer SUBSCRIBER_JWT_TOKEN' \
--header 'Content-Type: application/json' \
--data-raw '{
"feedbackId": "feedback-uuid"
}'
const response = await fetch('https://api.userorbit.com/v1/public/feedback-votes.create', {
method: 'POST',
headers: {
'Authorization': 'Bearer SUBSCRIBER_JWT_TOKEN',
'Content-Type': 'application/json'
},
body: JSON.stringify({
feedbackId: 'feedback-uuid'
})
});
const { data: vote, totalVotes } = await response.json();
console.log(`Vote created! Total votes: ${totalVotes}`);
import requests
response = requests.post(
'https://api.userorbit.com/v1/public/feedback-votes.create',
headers={
'Authorization': 'Bearer SUBSCRIBER_JWT_TOKEN',
'Content-Type': 'application/json'
},
json={
'feedbackId': 'feedback-uuid'
}
)
result = response.json()
vote = result['data']
total_votes = result['totalVotes']
print(f'Vote created! Total votes: {total_votes}')
{
"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
string
required
The feedback ID to vote on
Response
object
number
Updated total vote count for this feedback
curl --location --request POST 'https://api.userorbit.com/v1/public/feedback-votes.create' \
--header 'Authorization: Bearer SUBSCRIBER_JWT_TOKEN' \
--header 'Content-Type: application/json' \
--data-raw '{
"feedbackId": "feedback-uuid"
}'
const response = await fetch('https://api.userorbit.com/v1/public/feedback-votes.create', {
method: 'POST',
headers: {
'Authorization': 'Bearer SUBSCRIBER_JWT_TOKEN',
'Content-Type': 'application/json'
},
body: JSON.stringify({
feedbackId: 'feedback-uuid'
})
});
const { data: vote, totalVotes } = await response.json();
console.log(`Vote created! Total votes: ${totalVotes}`);
import requests
response = requests.post(
'https://api.userorbit.com/v1/public/feedback-votes.create',
headers={
'Authorization': 'Bearer SUBSCRIBER_JWT_TOKEN',
'Content-Type': 'application/json'
},
json={
'feedbackId': 'feedback-uuid'
}
)
result = response.json()
vote = result['data']
total_votes = result['totalVotes']
print(f'Vote created! Total votes: {total_votes}')
{
"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
Was this page helpful?

