Skip to main content
POST
/
vote
Vote on content
curl --request POST \
  --url https://yppncslmsswqydhhgygz.supabase.co/functions/v1/vote \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "content_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "content_type": "token",
  "vote_type": "upvote",
  "voting_token_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "post_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}'
{
  "success": true,
  "vote": {
    "action": "created",
    "vote_type": "upvote",
    "weight": 123,
    "upvotes": 123,
    "downvotes": 123,
    "weighted_upvotes": 123,
    "weighted_downvotes": 123
  }
}

Authorizations

Authorization
string
header
required

JWT token or API key

Body

application/json
content_id
string<uuid>
required
content_type
enum<string>
required
Available options:
token,
post,
livestream,
poll_option
vote_type
enum<string>
required
Available options:
upvote,
downvote
voting_token_id
string<uuid>
post_id
string<uuid>

Response

Successful response

success
boolean
required
vote
object
required