Skip to main content
POST
https://api.gurubase.io/api/v1/
/
{guru_type}
/
record_vote
Record Vote
curl --request POST \
  --url https://api.gurubase.io/api/v1/{guru_type}/record_vote/ \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "content_slug": "<string>",
  "binge_id": "<string>",
  "vote_type": "<string>",
  "feedback": "<string>"
}
'
{
    "vote": "upvote",
    "feedback": null
}
Record a user’s vote on a specific question. Multiple votes can be submitted for the same question, with each new vote overwriting the previous one. Downvotes can include optional feedback.
Important: Feedback (votes) can only be given for normal answers. Simple interactions and clarifications cannot receive votes. Attempting to vote on these question types will return a 400 error. You can check whether a question can receive feedback by checking the can_receive_feedback field returned by the Ask Question endpoint.

Path Parameters

guru_type
string
required
The type/slug of the Guru

Headers

x-api-key
string
required
Your API key for authentication. You can obtain your API key from the Gurubase dashboard.

Body Parameters

content_slug
string
required
The slug identifier of the question to vote on
binge_id
string
Optional binge session identifier. Can be None
vote_type
string
required
The type of vote to record. Must be either “upvote” or “downvote”
feedback
string
Optional feedback text for downvotes. Maximum 200 characters

Response

vote
string
The recorded vote type (“upvote” or “downvote”)
feedback
string
The feedback provided with the vote (if any)
msg
string
Error message or status message
{
    "vote": "upvote",
    "feedback": null
}

Notes

  • Multiple votes can be submitted for the same question. Each new vote overwrites the previous vote.
  • Feedback (votes) can only be given for normal answers. Simple interactions and clarifications cannot receive votes.
  • Feedback is optional but limited to 200 characters
  • The binge_id parameter can be null, empty string, or “None” and will be treated as null
  • Only “upvote” and “downvote” are valid vote types