Overview
Sublay provides a two-tier moderation system:- Project-level moderation — Users with project-level admin permissions can moderate any content across the entire project, regardless of which space it belongs to. This is typically used by the platform owner or trust-and-safety team.
-
Space-level moderation — Users with
adminormoderatorroles within a specific space can moderate content in that space only. Their capabilities are scoped to their space — they cannot view or act on reports from other spaces.
Requires the
moderation bundle. Reports and suspensions are only available when the moderation bundle is installed on your project. See Bundles to add it.Reporting Flow
User submits a report
Call
useCreateReport with the target ID and a reason key. If the target has already been reported, the user’s report is appended to the existing report record.Report is associated with a space
The server automatically determines which space the reported content belongs to. Reports with no space (content outside a space) are visible only to project-level moderators.
Moderator reviews pending reports
A moderator fetches pending reports with
useFetchModeratedReports:- Project-level moderators see all reports across the entire project.
- Space-level moderators see only reports for content within their space.
Moderator takes action
Use
useHandleSpaceEntityReport or useHandleSpaceCommentReport to remove content, ban the author, or dismiss the report. Space-level moderators can only act on content within their space.Moderation Tiers
Project-Level Moderation
Project-level moderation is handled through the Sublay Dashboard — no code integration is required. Platform owners and trust-and-safety teams can log into the dashboard to review and act on reports across the entire project.- Managed entirely from the Sublay Dashboard
- Access to all reports, regardless of space
- Can remove any entity or comment in the project
- Can ban any user from any space
- Suitable for platform-wide policy enforcement
Space-Level Moderation
Space-level moderation must be integrated in your application. Users with anadmin or moderator role within a specific space can be given a moderation UI inside your app using the hooks below. Their capabilities are scoped to that space — they cannot view or act on reports from other spaces.
- Built into your app using the provided hooks
- Can only view reports for content within their space
- Can remove entities and comments within their space
- Can ban users from their space only
- Cannot access reports or take action in other spaces
Report Reasons
| Key | Label |
|---|---|
spam | It’s spam |
inappropriateContent | Contains inappropriate content |
harassment | It’s harassment or bullying |
misinformation | Spreads false information |
hateSpeech | Contains hate speech or symbols |
violence | Promotes violence or dangerous behavior |
illegalActivity | Promotes illegal activity |
selfHarm | Promotes self-harm or suicide |
other | Other |
@sublay/core:
Hooks
The hooks below are used for space-level moderation integrated in your app. Project-level moderation does not require any hooks — it is handled through the Sublay Dashboard.useCreateReport
Submit a report against an entity or comment.
useFetchModeratedReports
Fetch pending reports for spaces the current user moderates.
useHandleSpaceEntityReport
Action an entity report as a space moderator.
useHandleSpaceCommentReport
Action a comment report as a space moderator.
Related
- Space Moderation — Direct moderation of entities and comments within a space (without the reporting flow)
- Space Rules — Define community rules that appear alongside moderation decisions

