Flag
Reports content for moderation.
{ "type": "Flag", "target": "post:64f0...@kwln.org", "object": { "reason": "spam", "notes": "posting the same link repeatedly" }}Required: actorId, target (a string), object (must be present -- it carries reason).
Reason resolution
Section titled “Reason resolution”reason is validated against a server-configured Settings.flagOptions map ({ code: { label, description } }). It accepts:
- A direct code match.
- A case-insensitive label match.
- A fallback to the
"other"code, with the raw input preserved asdetails, ifflagOptions.otheris configured.
If the server has no flagOptions configured at all, every Flag call errors with "Flag: server flagOptions not configured".
Same actor + same target + same reason.code + an existing status: "open" Flag returns the existing flag (duplicated: true) rather than creating a new one.
targetType/targetActorId are resolved server-side via a best-effort lookup -- null for unknown/remote targets, which also sets federate: true as a signal that the remote host may need to be told.
Response
Section titled “Response”{ activity, flag: <Flag doc>, federate: bool }.
Client mapping
Section titled “Client mapping”flag({ targetId, reason, notes }) -> { type: "Flag", target: targetId, object: { reason, notes } } -- matches exactly.