reports module lets end users file reports against entities and comments, and lets moderators read the moderated reports queue.
createReport
Files a report against an entity, comment, or chat message. A user has at most one open report of a target: reporting it again returns that same report. Only content users posted can be reported: content with no author (the app’s own, or a deleted account’s) answers400 report/no-author, and content its author deleted or a moderator removed answers 404 report/target-not-found. See Create Report.
One of
spam, inappropriateContent, harassment, misinformation,
hateSpeech, violence, illegalActivity, selfHarm, other. The API
rejects anything else — use other plus details for the rest.Reporting a chat message uses
targetType: "message" with the message id
as targetId — the conversation is resolved server-side. Reports on space
conversations reach space moderators; reports on DMs and group chats are
project-level and appear only in the Sublay dashboard.Promise<CreateReportResponse>
fetchModeratedReports
Fetches a paginated list of moderated reports, with optional filters.Restrict results to reports of a specific target type. Message reports appear
in this queue only for space conversations — DM and group reports are
project-level and surface in the dashboard.
Restrict results to reports with a specific moderation status.
The number of reports to return per page: a whole number from
1 to 100. Defaults to 20. A larger value is rejected with 400 report/invalid-query, never lowered to 100.Promise<PaginatedResponse<Report>>. Each report carries id, spaceId, targetId, targetType, status, reporterCount, timestamps, every user’s individual report in userReports ({ id, reportId, userId, reason, details, createdAt, updatedAt }), the moderator’s actionTaken (or null), and:
target— the reported content, typed bytargetType: the stored entity, comment or chat message record with its author asuser(User | null), without the computed fields and associations a regular fetch adds.nullwhen the content can no longer be found.space— the stored record of the space the report was filed in, ornull.

