Skip to main content
Mint Reputation Grant
Mints 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 key only. A user token never reaches this route. The mint always acts as the app: there is no sender, so actingUserId is refused (400 reputation-grant/unsupported-param). Blocks are ignored, suspension is not consulted, and a 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 string "none" is refused with 400 reputation-grant/unsupported-param (see Saying “no value”). 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. 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.
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. 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 credit the general bucket on any target.
string
UUID of the rewarded record. Must be supplied together with targetType, and must exist at the time of granting.
There is deliberately no actor field. The grant is written with a null senderId and sourceType: "app".

Response

Returns 201 with the created ReputationGrant. A positive mint notifies the recipient 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 mint on a message also broadcasts message:grant to its 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

Also returned for a fractional amount ("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".
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.
The reputation bundle is missing, a spaceId was supplied on a project without spaces, or the target’s bundle is absent (e.g. a message target without chat). missingTables names exactly what is absent.
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.
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. A mint is not membership-checked, so a message target only has to exist.
The request sent actingUserId. This endpoint always acts as the app, so no caller may name a user.
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: node-sdk mintGrant · Create Reputation Grant