Fetch Blocked Users
curl --request GET \
--url https://api.sublay.io/api/v6/:projectId/api/v7/blocks \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.sublay.io/api/v6/:projectId/api/v7/blocks"
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/api/v6/:projectId/api/v7/blocks', 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/api/v7/blocks",
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/api/v6/:projectId/api/v7/blocks"
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/api/v6/:projectId/api/v7/blocks")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sublay.io/api/v6/:projectId/api/v7/blocks")
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_body{
"data": [
{
"id": "<string>",
"blockedUser": {},
"createdAt": "<string>"
}
],
"pagination": {
"page": 123,
"pageSize": 123,
"totalItems": 123,
"totalPages": 123,
"hasMore": true
}
}User Block Operations
Fetch Blocked Users
Get the acting user’s own paginated list of blocked users
Fetch Blocked Users
curl --request GET \
--url https://api.sublay.io/api/v6/:projectId/api/v7/blocks \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.sublay.io/api/v6/:projectId/api/v7/blocks"
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/api/v6/:projectId/api/v7/blocks', 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/api/v7/blocks",
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/api/v6/:projectId/api/v7/blocks"
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/api/v6/:projectId/api/v7/blocks")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sublay.io/api/v6/:projectId/api/v7/blocks")
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_body{
"data": [
{
"id": "<string>",
"blockedUser": {},
"createdAt": "<string>"
}
],
"pagination": {
"page": 123,
"pageSize": 123,
"totalItems": 123,
"totalPages": 123,
"hasMore": true
}
}Returns a paginated list of the users the acting user has blocked (their outbound blocks), each row carrying a public summary of the blocked user. This is the private “manage / way back to unblock” surface.
A block list is private — only the blocker can read their own list. It exposes only the caller’s outbound blocks; there is no way to read who has blocked the caller.
Requires the
moderation bundle. A project without the moderation bundle returns 403 database/tables-not-available. See Bundles.Query Parameters
number
default:"1"
Page number for pagination.
number
default:"20"
Number of results per page. Max
100.string
The user whose own block list to read (the blocker). Only service/master keys may supply a
userId other than the caller’s own; with a user token the subject is derived from the token.Response
On success, returns HTTP200 with a paginated response:
array
object

