Skip to main content
The space moderation functions let admins and moderators resolve reports, moderate entities, comments, and chat messages, and manage community rules within a space.

handleEntityReport

Resolves a reported entity by applying one or more actions.
string
required
The Sublay space ID.
string
required
The ID of the report to resolve.
string
required
The ID of the reported entity.
string[]
required
One or more actions to apply: "remove-entity", "ban-user", and/or "dismiss".
string
A summary of the resolution.
string
The reason for the resolution.
string
The user to ban. Required when actions includes "ban-user".
userId here is the ban target — the user being banned — not the actor performing the moderation.
ReturnsPromise<{ message: string; code: string }>

handleCommentReport

Resolves a reported comment by applying one or more actions.
string
required
The Sublay space ID.
string
required
The ID of the report to resolve.
string
required
The ID of the reported comment.
string[]
required
One or more actions to apply: "remove-comment", "ban-user", and/or "dismiss".
string
A summary of the resolution.
string
The reason for the resolution.
string
The user to ban. Required when actions includes "ban-user".
userId here is the ban target — the user being banned — not the actor performing the moderation.
ReturnsPromise<{ message: string; code: string }>

handleSpaceChatReport

Resolves a reported space chat message by applying one or more actions.
string
required
The Sublay space ID.
string
required
The ID of the report to resolve.
string[]
required
One or more actions to apply: "remove-message", "ban-user", and/or "dismiss".
string
A summary of the resolution.
string
The reason for the resolution.
string
The user to ban. Required when actions includes "ban-user".
string
The message to remove. Required when actions includes "remove-message".
userId here is the ban target — the user being banned — not the actor performing the moderation.
ReturnsPromise<{ message: string; code: string }>

moderateSpaceEntity

Approves or removes an entity in a space.
string
required
The Sublay space ID.
string
required
The ID of the entity to moderate.
string
required
The action to take: "approve" or "remove".
string
The reason for the moderation action.
ReturnsPromise<{ message: string; moderationStatus: "approved" | "removed" }>

setSpaceEntityNsfw

Sets the NSFW own-flag on an entity within a space — including other users’ entities. Separate from moderateSpaceEntity: it labels the entity (nsfw), it does not approve/remove it. Requires the acting user to be an admin or moderator of the space.
string
required
The Sublay space ID containing the entity.
string
required
The ID of the entity to flag or unflag.
boolean
required
The NSFW own-flag to set on the entity.
ReturnsPromise<{ message: string; nsfw: boolean }>

moderateSpaceComment

Approves or removes a comment in a space.
string
required
The Sublay space ID.
string
required
The ID of the comment to moderate.
string
required
The action to take: "approve" or "remove".
string
The reason for the moderation action.
ReturnsPromise<{ message: string; moderationStatus: "approved" | "removed" }>

moderateSpaceChatMessage

Applies a moderation status to a space chat message.
string
required
The Sublay space ID.
string
required
The ID of the chat message to moderate.
string
required
The moderation status to apply: "removed".
string
The reason for the moderation action.
ReturnsPromise<{ message: string; moderationStatus: string }>

fetchManyRules

Fetches all rules for a space.
string
required
The Sublay space ID.
ReturnsPromise<FetchManyRulesResponse>

fetchRule

Fetches a single rule by ID.
string
required
The Sublay space ID.
string
required
The ID of the rule to fetch.
ReturnsPromise<Rule>

createRule

Creates a rule in a space.
string
required
The Sublay space ID.
string
required
The rule title.
string
The rule description.
ReturnsPromise<Rule>

updateRule

Updates a rule’s title and/or description.
string
required
The Sublay space ID.
string
required
The ID of the rule to update.
string
The new rule title.
string
The new rule description.
ReturnsPromise<Rule>

deleteRule

Deletes a rule.
string
required
The Sublay space ID.
string
required
The ID of the rule to delete.
ReturnsPromise<DeleteRuleResponse>

reorderRules

Reorders a space’s rules.
string
required
The Sublay space ID.
string[]
required
The rule IDs in the new order.
ReturnsPromise<Rule[]>