Skip to main content

Upvote for a Specific Poll Choice

This endpoint upvotes a specific poll choice in a discussion.

info

If the discussion has no poll associated the response status code is 404.

info

This operation requires authentication

HTTP Request

POST /api/v2/discussion/{id}/poll/vote/

Parameters

NameInTypeRequiredDescription
idpathstringtrueA unique integer value identifying this discussion
choicebodyintegertrueA unique integer value identifying the choice to be upvoted

Example Request

const inputBody = {
"choice": "integer"
};
const headers = {
'Content-Type':'application/json',
'Accept':'application/json',
'Authorization': 'Bearer {access_token}'
};

fetch('/api/v2/discussion/{id}/poll/vote/',
{
method: 'POST',
headers: headers,
body: inputBody
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});

Responses

StatusMeaningDescriptionSchema
204No ContentResponse status codeNone