spaces module: report handling, content moderation actions, and community rules management.
Reports
handleEntityReport
Resolves a report filed against an entity in a space by applying one or more moderation actions.Optional. The server bans the author of the reported content; if sent, this must be that author.
Promise<HandleReportResponse>
handleCommentReport
Resolves a report filed against a comment in a space by applying one or more moderation actions.Optional. The server bans the author of the reported content; if sent, this must be that author.
Promise<HandleReportResponse>
Chat message reports are handled by
spaces.handleSpaceChatReport, which
is documented with the other space-conversation functions in
Chat → Space conversations. Reports on
DM and group conversations are project-level and are resolved in the Sublay
dashboard, not through this SDK.Content Moderation
moderateSpaceEntity
Approves or removes an entity within a space.Promise<ModerationResponse>
setSpaceEntityNsfw
Sets the NSFW own-flag on an entity within a space — including other users’ entities. This is a separate axis frommoderateSpaceEntity: it labels the entity (nsfw), it does not approve/remove it. Requires the acting user to be an admin or moderator of the space.
Promise<{ message: string; nsfw: boolean }>
moderateSpaceComment
Approves or removes a comment within a space.Promise<ModerationResponse>
Rules
Rules are community guidelines displayed to members. They are ordered and each consists of a title and optional description.fetchManyRules
Fetches all rules for a space.Promise<FetchManyRulesResponse>
fetchRule
Fetches a single rule by its ID.Promise<Rule>
createRule
Creates a new rule for a space.Promise<Rule>
updateRule
Updates an existing rule’s title or description.Promise<Rule>
deleteRule
Deletes a rule from a space.Promise<DeleteRuleResponse>
reorderRules
Sets the display order of all rules for a space by providing an ordered array of rule IDs.Promise<Rule[]> — the full list of rules in their new order.
