Fetch Entity Reactions
curl --request GET \
--url https://api.sublay.io/v8/:projectId/entities/:entityId/reactions \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.sublay.io/v8/:projectId/entities/:entityId/reactions"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.sublay.io/v8/:projectId/entities/:entityId/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/entities/:entityId/reactions",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
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/v8/:projectId/entities/:entityId/reactions"
req, _ := http.NewRequest("GET", 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.get("https://api.sublay.io/v8/:projectId/entities/:entityId/reactions")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sublay.io/v8/:projectId/entities/:entityId/reactions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_bodyEntity Endpoints
Fetch Entity Reactions
Get a paginated list of reactions on an entity
Fetch Entity Reactions
curl --request GET \
--url https://api.sublay.io/v8/:projectId/entities/:entityId/reactions \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.sublay.io/v8/:projectId/entities/:entityId/reactions"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.sublay.io/v8/:projectId/entities/:entityId/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/entities/:entityId/reactions",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
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/v8/:projectId/entities/:entityId/reactions"
req, _ := http.NewRequest("GET", 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.get("https://api.sublay.io/v8/:projectId/entities/:entityId/reactions")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sublay.io/v8/:projectId/entities/:entityId/reactions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_bodyRequires the
entities bundle. A project without the entities bundle returns 403 database/tables-not-available. See Bundles.moderation bundle.
Path Parameters
string
required
The UUID of the entity.
Query Parameters
number
default:"1"
Page number (1-indexed). A whole number of at least
1 — 0, a negative number or a non-integer value returns 400 entity/invalid-query.number
default:"20"
Number of reactions per page. A whole number of at least
1 — 0, a negative number or a non-integer value returns 400 entity/invalid-query. Maximum 100 — larger values are treated as 100.string
Filter to a specific reaction type. One of:
upvote, downvote, like, love, wow, sad, angry, funny. When omitted, all reaction types are returned.string
default:"DESC"
Sort by creation time.
ASC or DESC.Space-scoped reputation
This endpoint has a space in context, so it accepts the opt-in reputation params. They add aspaceReputation field to each reactor’s user, alongside the always-present reputation total. Requires the reputation bundle. See the Reputation data model for the full contract.
Response
{
"data": [
{
"id": "uuid",
"reactionType": "like",
"userId": "uuid",
"targetId": "entityId",
"targetType": "entity",
"user": {
"id": "uuid",
"name": "Alice",
"username": "alice",
"avatar": "https://...",
"reputation": 120
},
"createdAt": "2025-01-01T00:00:00Z",
"updatedAt": "2025-01-01T00:00:00Z"
}
],
"pagination": {
"page": 1,
"pageSize": 20,
"totalPages": 3,
"totalItems": 42,
"hasMore": true
}
}
Error Responses
Invalid Query — 400
Invalid Query — 400
Returned when
page or limit is below 1 or not a whole number, reactionType isn’t one of the eight types, or sortDir isn’t ASC or DESC.{ "error": "page: Page must be a positive integer", "code": "entity/invalid-query" }
Not Found — 404
Not Found — 404
{ "error": "Entity not found.", "code": "entity/not-found" }

