Remove Comment Reaction
curl --request DELETE \
--url https://api.sublay.io/v8/:projectId/comments/:commentId/reactions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"userId": "<string>"
}
'import requests
url = "https://api.sublay.io/v8/:projectId/comments/:commentId/reactions"
payload = { "userId": "<string>" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.delete(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'DELETE',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({userId: '<string>'})
};
fetch('https://api.sublay.io/v8/:projectId/comments/:commentId/reactions', 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/v8/:projectId/comments/:commentId/reactions",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_POSTFIELDS => json_encode([
'userId' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.sublay.io/v8/:projectId/comments/:commentId/reactions"
payload := strings.NewReader("{\n \"userId\": \"<string>\"\n}")
req, _ := http.NewRequest("DELETE", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://api.sublay.io/v8/:projectId/comments/:commentId/reactions")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"userId\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sublay.io/v8/:projectId/comments/:commentId/reactions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"userId\": \"<string>\"\n}"
response = http.request(request)
puts response.read_bodyComment Endpoints
Remove Comment Reaction
Remove the authenticated user’s reaction from a comment
Remove Comment Reaction
curl --request DELETE \
--url https://api.sublay.io/v8/:projectId/comments/:commentId/reactions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"userId": "<string>"
}
'import requests
url = "https://api.sublay.io/v8/:projectId/comments/:commentId/reactions"
payload = { "userId": "<string>" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.delete(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'DELETE',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({userId: '<string>'})
};
fetch('https://api.sublay.io/v8/:projectId/comments/:commentId/reactions', 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/v8/:projectId/comments/:commentId/reactions",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_POSTFIELDS => json_encode([
'userId' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.sublay.io/v8/:projectId/comments/:commentId/reactions"
payload := strings.NewReader("{\n \"userId\": \"<string>\"\n}")
req, _ := http.NewRequest("DELETE", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://api.sublay.io/v8/:projectId/comments/:commentId/reactions")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"userId\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sublay.io/v8/:projectId/comments/:commentId/reactions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"userId\": \"<string>\"\n}"
response = http.request(request)
puts response.read_bodyRemoves the authenticated user’s reaction from a comment. The comment’s
reactionCounts map is decremented for the removed reaction type.
Authentication required.
Path Parameters
string
required
The UUID of the comment to remove the reaction from.
Body Parameters
string
The user whose reaction is removed. Service or master key only, and required with one — a key has no user of its own, so leaving it out returns
400 comment/missing-user-id. A user token always acts as itself: naming a different user returns 403 comment/unauthorized.Blocks
Removing your own reaction is undoing your own action, so a block doesn’t stop it: as long as the comment is visible to you — in full, or as a placeholder — your reaction is removed. This includes a comment whose author blocked you, a comment its author deleted and a moderator-removed comment — even though neither of the last two takes new reactions. When the comment isn’t visible to you at all — it sits on an entity whose author has blocked you — the request returns404 comment/not-found and nothing changes. The exception is your own comment on such an entity: it stays visible to you, so removing your reaction from it works.
Response
Returns the Comment as you’d see it after the change — in full, flagged withisAuthorBlocked, or as a placeholder — with the updated reactionCounts. If you had no reaction on the comment, the comment is returned unchanged.
Error Responses
Invalid Params — 400
Invalid Params — 400
Returned when
commentId isn’t a valid UUID.{ "error": "commentId: Invalid UUID format", "code": "comment/invalid-params" }
Acting as another user — 403
Acting as another user — 403
Returned when a request authenticated with a user token sends a
userId other than that user’s own ID.{ "error": "Unauthorized", "code": "comment/unauthorized" }
Missing User — 400
Missing User — 400
Returned when a service or master key sends no
userId.{ "error": "Missing user ID", "code": "comment/missing-user-id" }
Not Found — 404
Not Found — 404
{ "error": "Comment not found.", "code": "comment/not-found" }

