EndpointsPosts

Set post vote

PUT/v2/posts/{post_id}/vote

Sets, changes, or removes the caller's vote and returns the updated post score.

Authorization

BearerAuth
AuthorizationBearer <token>

Bearer token issued by Softmax

In: header

Path Parameters

post_id*Post Id

Post ID.

Match^post_[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$

Request Body

application/json

value*Value

Vote to apply: 1 for upvote, -1 for downvote, or 0 to remove the current vote.

Value in

  • -1
  • 0
  • 1
curl -X PUT "https://softmax.com/api/observatory/v2/posts/string/vote" \  -H "Content-Type: application/json" \  -d '{    "value": -1  }'
{  "value": -1,  "score": 0,  "vote_count": 0}