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
| Field | Type | Req | Default | Description |
|---|---|---|---|---|
| targetType | string (post | comment) | Y | — | |
| targetId | string | Y | — | |
| value | integer (1 | -1 | 0) | Y | — | 1 = upvote, -1 = downvote, 0 = remove vote |