Remove Upvote from Comment
curl --request PATCH \
--url https://api.sublay.io/api/v6/:projectId/comments/:commentId/remove-upvote \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.sublay.io/api/v6/:projectId/comments/:commentId/remove-upvote"
headers = {"Authorization": "Bearer <token>"}
response = requests.patch(url, headers=headers)
print(response.text)const options = {method: 'PATCH', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.sublay.io/api/v6/:projectId/comments/:commentId/remove-upvote', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.sublay.io/api/v6/:projectId/comments/:commentId/remove-upvote",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.sublay.io/api/v6/:projectId/comments/:commentId/remove-upvote"
req, _ := http.NewRequest("PATCH", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.sublay.io/api/v6/:projectId/comments/:commentId/remove-upvote")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sublay.io/api/v6/:projectId/comments/:commentId/remove-upvote")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "<string>",
"entityId": "<string>",
"upvotes": [
{}
],
"downvotes": [
{}
],
"content": "<string>"
}Comment Endpoints
Remove Upvote from Comment
Remove an upvote from a comment
Remove Upvote from Comment
curl --request PATCH \
--url https://api.sublay.io/api/v6/:projectId/comments/:commentId/remove-upvote \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.sublay.io/api/v6/:projectId/comments/:commentId/remove-upvote"
headers = {"Authorization": "Bearer <token>"}
response = requests.patch(url, headers=headers)
print(response.text)const options = {method: 'PATCH', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.sublay.io/api/v6/:projectId/comments/:commentId/remove-upvote', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.sublay.io/api/v6/:projectId/comments/:commentId/remove-upvote",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.sublay.io/api/v6/:projectId/comments/:commentId/remove-upvote"
req, _ := http.NewRequest("PATCH", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.sublay.io/api/v6/:projectId/comments/:commentId/remove-upvote")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sublay.io/api/v6/:projectId/comments/:commentId/remove-upvote")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "<string>",
"entityId": "<string>",
"upvotes": [
{}
],
"downvotes": [
{}
],
"content": "<string>"
}Removes a previously added upvote from a comment by the authenticated user. Subtracts the user’s ID from the
upvotes array. Decreases the reputation of the comment’s author.
Path Parameters
Response
Returns the updated comment with the upvote removed.Error Responses
Missing Comment ID - 400 Bad Request
Missing Comment ID - 400 Bad Request
{
"error": "Missing required data",
"code": "comment/missing-data"
}
Not Found - 404 Not Found
Not Found - 404 Not Found
{
"error": "Comment not found",
"code": "comment/not-found"
}
Not Upvoted - 409 Conflict
Not Upvoted - 409 Conflict
{
"error": "User hasn't upvoted this comment",
"code": "comment/not-upvoted"
}
Server Error - 500 Internal Server Error
Server Error - 500 Internal Server Error
{
"error": "Internal server error.",
"code": "comment/server-error",
"details": "[error message]"
}
Notes
- The authenticated user must have already upvoted the comment.
- Removes the user’s ID from
upvotes. - Deducts reputation from the comment’s author.
- A
409 Conflictis returned if the user hasn’t upvoted the comment.

