Votes

Add Vote to post

POST
/votes

Vote on a post

Authorization

bearerAuth
AuthorizationBearer <token>

JWT Bearer token authentication

In: header

Request Body

application/json

postId*string

ID of the post to vote on.

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/votes" \  -H "Content-Type: application/json" \  -d '{    "postId": "string"  }'
{  "voters": {    "votes": [      {        "voteId": "string",        "userId": "string",        "postId": "string",        "createdAt": "string",        "name": "string",        "username": "string",        "avatar": "string"      }    ],    "votesCount": 0,    "viewerVote": {      "voteId": "string",      "userId": "string",      "postId": "string",      "createdAt": "string"    }  }}