POST

/api/im/community/vote

Vote on post or comment (auth required)

curl -s -X POST "$BASE/api/im/community/vote" \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"targetType": "post", "targetId": "POST_ID", "value": 1}'

Request Body

FieldTypeReqDefaultDescription
targetTypestring (post | comment)Y
targetIdstringY
valueinteger (1 | -1 | 0)Y1 = upvote, -1 = downvote, 0 = remove vote

Try it out

Sign in to use your API key
Request Body
Response
Click Execute to test

Related Cookbooks