Mint Reputation Grant
curl --request POST \
--url https://api.sublay.io/v7/:projectId/reputation-grants/mint \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"recipientId": "<string>",
"amount": 123,
"spaceId": {},
"note": {},
"metadata": {},
"targetType": "<string>",
"targetId": "<string>"
}
'import requests
url = "https://api.sublay.io/v7/:projectId/reputation-grants/mint"
payload = {
"recipientId": "<string>",
"amount": 123,
"spaceId": {},
"note": {},
"metadata": {},
"targetType": "<string>",
"targetId": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
recipientId: '<string>',
amount: 123,
spaceId: {},
note: {},
metadata: {},
targetType: '<string>',
targetId: '<string>'
})
};
fetch('https://api.sublay.io/v7/:projectId/reputation-grants/mint', 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/v7/:projectId/reputation-grants/mint",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'recipientId' => '<string>',
'amount' => 123,
'spaceId' => [
],
'note' => [
],
'metadata' => [
],
'targetType' => '<string>',
'targetId' => '<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/v7/:projectId/reputation-grants/mint"
payload := strings.NewReader("{\n \"recipientId\": \"<string>\",\n \"amount\": 123,\n \"spaceId\": {},\n \"note\": {},\n \"metadata\": {},\n \"targetType\": \"<string>\",\n \"targetId\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.sublay.io/v7/:projectId/reputation-grants/mint")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"recipientId\": \"<string>\",\n \"amount\": 123,\n \"spaceId\": {},\n \"note\": {},\n \"metadata\": {},\n \"targetType\": \"<string>\",\n \"targetId\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sublay.io/v7/:projectId/reputation-grants/mint")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"recipientId\": \"<string>\",\n \"amount\": 123,\n \"spaceId\": {},\n \"note\": {},\n \"metadata\": {},\n \"targetType\": \"<string>\",\n \"targetId\": \"<string>\"\n}"
response = http.request(request)
puts response.read_bodyReputation Grant Endpoints
Mint Reputation Grant
Create reputation from nothing — or destroy it — and credit a user’s bucket
Mint Reputation Grant
curl --request POST \
--url https://api.sublay.io/v7/:projectId/reputation-grants/mint \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"recipientId": "<string>",
"amount": 123,
"spaceId": {},
"note": {},
"metadata": {},
"targetType": "<string>",
"targetId": "<string>"
}
'import requests
url = "https://api.sublay.io/v7/:projectId/reputation-grants/mint"
payload = {
"recipientId": "<string>",
"amount": 123,
"spaceId": {},
"note": {},
"metadata": {},
"targetType": "<string>",
"targetId": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
recipientId: '<string>',
amount: 123,
spaceId: {},
note: {},
metadata: {},
targetType: '<string>',
targetId: '<string>'
})
};
fetch('https://api.sublay.io/v7/:projectId/reputation-grants/mint', 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/v7/:projectId/reputation-grants/mint",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'recipientId' => '<string>',
'amount' => 123,
'spaceId' => [
],
'note' => [
],
'metadata' => [
],
'targetType' => '<string>',
'targetId' => '<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/v7/:projectId/reputation-grants/mint"
payload := strings.NewReader("{\n \"recipientId\": \"<string>\",\n \"amount\": 123,\n \"spaceId\": {},\n \"note\": {},\n \"metadata\": {},\n \"targetType\": \"<string>\",\n \"targetId\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.sublay.io/v7/:projectId/reputation-grants/mint")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"recipientId\": \"<string>\",\n \"amount\": 123,\n \"spaceId\": {},\n \"note\": {},\n \"metadata\": {},\n \"targetType\": \"<string>\",\n \"targetId\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sublay.io/v7/:projectId/reputation-grants/mint")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"recipientId\": \"<string>\",\n \"amount\": 123,\n \"spaceId\": {},\n \"note\": {},\n \"metadata\": {},\n \"targetType\": \"<string>\",\n \"targetId\": \"<string>\"\n}"
response = http.request(request)
puts response.read_bodyMints reputation: it is created from nothing and credited to a user, with no sender and nothing debited. A mint is the app speaking, not a person — contest payouts, bounty settlements, staff picks, welcome bonuses.
A mint may also be negative, which is the only way to take reputation away: a moderation clawback, a decay sweep, or a correction to a mistaken grant. A negative mint may drive a bucket below zero (buckets have no floor).
Service or master key only. A user token never reaches this route. Blocks are ignored, suspension is not consulted (there is no acting user), and a
There is deliberately no actor field. The grant is written with a
Also returned for a fractional amount (
The
Returned whether the recipient was already gone or was deleted while the mint was in flight — the two answers are byte-identical, and neither leaks the underlying constraint.
The target record does not exist. A mint is not membership-checked, so a
Rate limit: 50 requests per 5 minutes per IP. Exceeding it returns
chat-message target is not membership-checked — the app is trusted.
Requires the reputation bundle.
Body Parameters
string
required
UUID of the user credited — or, with a negative amount, debited.
number
required
Any non-zero whole number between
-2147483648 and 2147483647. Negatives destroy reputation.string | null
UUID of the space whose bucket is credited. Omitted or
null means the project-general bucket. The space is validated before anything is written — a bucket for a space that does not exist would count toward its owner’s profile total while being invisible in every space-scoped view. An ID that names no space is rejected with 404 reputation-grant/space-not-found, and naming a space on a project without the spaces bundle is rejected with 403 database/tables-not-available. Transfers are validated the same way.string | null
Free-text note. Trimmed, up to 2000 characters.
object
Arbitrary key-value data. Up to 1 MB. Omit the key when unused —
null is not accepted.string
What the grant is for:
"entity", "comment", or "chat-message". Must be supplied together with targetId.string
UUID of the rewarded record. Must be supplied together with
targetType, and must exist at the time of granting.null senderId and sourceType: "app".
Response
Returns201 with the created ReputationGrant.
A positive mint notifies the recipient and, for a chat-message target, broadcasts message:grant to the conversation. A negative mint is entirely silent: no notification, no broadcast, and invisible on every public read surface. Read it back from Fetch User Grant History.
Error Responses
Invalid Body — 400
Invalid Body — 400
{ "error": "amount: amount must be non-zero", "code": "reputation-grant/invalid-body" }
"amount: Invalid input: expected int, received number") or one outside the signed 32-bit range ("amount: Too big: expected number to be <=2147483647"). Field-level failures are prefixed with the field path, so error reads "<path>: <message>". The one whole-body rule has no path and so no prefix: supplying targetType without targetId (or the reverse) returns "targetType and targetId must be supplied together".Elevated Auth Required — 403
Elevated Auth Required — 403
{ "error": "Service or master key required.", "code": "auth/elevated-auth-required" }
Tables Not Available — 403
Tables Not Available — 403
{
"code": "database/tables-not-available",
"missingTables": ["Spaces"],
"dashboardUrl": "https://…/<projectId>/database"
}
reputation bundle is missing, a spaceId was supplied on a project without spaces, or the target’s bundle is absent (e.g. a chat-message target without chat). missingTables names exactly what is absent.User Not Found — 404
User Not Found — 404
{ "error": "The recipient of this grant does not exist.", "code": "reputation-grant/user-not-found" }
Space Not Found — 404
Space Not Found — 404
{ "error": "The space this grant targets does not exist.", "code": "reputation-grant/space-not-found" }
Target Not Found — 404
Target Not Found — 404
{ "error": "The grant target does not exist.", "code": "reputation-grant/target-not-found" }
chat-message target only has to exist.Conflict — 409
Conflict — 409
{ "error": "The grant conflicted with a concurrent write. Retry.", "code": "reputation-grant/conflict" }
429 with a plain-text message and no code.
See also: node-sdk mintGrant · Create Reputation Grant
