POST
/
{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. Users can vote once per question, and downvotes can include optional feedback.

Path Parameters

guru_type
string
required

The type/slug of the Guru

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

  • Each question can only be voted once.
  • If the question has already been voted, the endpoint returns a 200 status with the existing vote
  • 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