Skip to main content
Create Reputation Grant
Transfers reputation between two users. This is a debited transfer: the amount leaves the sender’s bucket and lands in the recipient’s bucket for the same space. Nothing is created — see Mint Reputation Grant for that. Requires authentication. A user token sends from the token’s own user. A service key names the sender in actingUserId, which is how an app performs a mediated transfer — enforcing its own economic rules before letting the transfer through. The project-level user-grant switch only chooses the channel (user tokens straight from the client, or your backend), so mediated transfers skip it; everything else is the sender’s own — blocks, suspension, conversation membership and the balance check apply exactly as to the sender’s own grant. To pay a user regardless, mint. Requires the reputation bundle (both ReputationBuckets and ReputationGrants must be present in the project’s schema).

Body Parameters

string
required
UUID of the user receiving the reputation. Must differ from the sender.
number
required
Whole number from 1 to 2147483647 (the signed 32-bit maximum, which is also the width of a reputation balance). A transfer can never be zero, negative, or fractional, and it can never exceed what the sender holds in the source bucket.
string | null
UUID of the space whose bucket pays. Omitted or null means the project-general bucket; the string "none" is refused with 400 reputation-grant/unsupported-param (see Saying “no value”). The reputation always lands in the recipient’s bucket for the same space — reputation never crosses between the general bucket and a space bucket. With a target (targetType and targetId), spaceId must be the target’s space or be omitted; any other space is rejected with 400 reputation-grant/space-mismatch.The space is validated before anything moves: an ID that names no space, or a space whose content the sender can’t read (see Who can read content: a private or members-only space they aren’t an active member of, or a space under one), 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.
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 "message" (a chat message). Values match exactly. Must be supplied together with targetId. The target does not have to be authored by the recipient. A grant with a spaceId must use the target’s space — an entity’s space, a comment’s entity’s space, or a message’s space chat’s space; a target in no space takes no spaceId — or it is rejected with 400 reputation-grant/space-mismatch (see The target is an annotation). Omit spaceId to reward any target from the general bucket. The sender must be able to read it: an entity or comment in a space whose content they can’t read answers 404 reputation-grant/target-not-found, like a missing target.
string
UUID of the rewarded record. Must be supplied together with targetType, and must exist at the time of granting.
string
Service key only, and required with one: the user this request acts as, the sender the reputation is debited from. A user token always acts as its own user and must not send it (400 reputation-grant/acting-user-not-allowed).

Response

Returns 201 with the created ReputationGrant, written with sourceType: "user". Both balances move: the sender’s bucket and profile total drop by amount, the recipient’s rise by the same. The recipient is notified (a reputation-grant app notification) when they can read the content of the grant’s space and, for an entity or comment target, of the space that target is in (a comment goes by its entity’s space). A grant or target in no space passes that check. For a message target in a space chat, the recipient must also be an active member of the chat’s space who can see it. A grant targeting a message is broadcast to the conversation as message:grant.

Gating and blocks

  • Project setting. The switch is settings.reputationGrants.allowUserInitiated, flipped from Settings → SDK in the dashboard. Only an explicit false closes the endpoint to user tokens — an absent key means grants are allowed — and the stored value survives unrelated settings updates, so it changes only when that key is explicitly sent. When the switch is off a user token is rejected with 403 reputation-grant/user-grants-disabled; service keys still work, so peer transfers remain available when routed through your backend.
  • Blocks. If either party has blocked the other, the grant is rejected in both directions — with the same non-disclosing answer as a missing user. This applies to mediated transfers too: a service key acting as the sender is refused exactly as the sender’s own grant would be.
  • Suspension. A suspended user cannot send a grant, including on the mediated path — a service key naming a suspended actingUserId is rejected too. A suspended user can always receive a grant.

Error Responses

Field-level failures are prefixed with the field path, so error reads "<path>: <message>" — "amount: Invalid input: expected int, received number" for a fractional amount, "recipientId: Invalid UUID format" for a malformed ID. 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".
The grant names a target and a spaceId that isn’t the target’s space: another space, or any space when the target is in none (an entity outside any space, a message in a group chat or DM). Omit spaceId, or send the target’s own. Checked after the target is found, so a target the sender can’t read still answers 404 reputation-grant/target-not-found.
A service key called the endpoint without naming an actingUserId.
A user token sent actingUserId, even naming its own user. Only a service key names the user it acts as; a user token always acts as its own user.
reason is null when none was given; endDate is null for a suspension with no end date.
The reputation bundle is missing — the route names both of its tables, so a project without it is told about both — or the target’s bundle is missing (e.g. a message target without chat), or a spaceId was supplied on a project without spaces. missingTables names exactly what is absent.
The spaceId names no space in this project, or one whose content the sender can’t read (answered exactly like a missing space). Checked before any balance is touched, so nothing moves.
One answer for both parties, deliberately non-disclosing — and the same answer returned when a block edge exists in either direction, for a user token and a service key alike.A service key that names an actingUserId that isn’t a user in this project gets the same code with its own text:
No such target. A chat message that was deleted or removed also answers this, as does an entity a moderator removed: none of them takes new grants.
The target record does not exist — or, for an entity or comment target, it sits in a space whose content the sender can’t read (a comment goes by its entity’s space) — or, for a message target, the sender is not an active member of that conversation, or it is a space chat whose space the sender isn’t an active member of or can’t see. The cases are byte-identical so a caller holding an ID cannot probe whether it exists. Mediated transfers are membership-checked on the named sender exactly as user tokens are.
Nothing moves. Also the answer when the spaceId names a real space the sender holds no funded bucket in.
Retryable. Two simultaneous transfers from the same bucket can never both succeed against the same balance.
targetType was "chat-message" in the body or the query. A chat message is message.
Rate limit: 50 requests per 5 minutes per IP. Exceeding it returns 429 request/rate-limited. See also: useCreateReputationGrant · node-sdk · js-sdk