Skip to main content
The 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) answers 400 report/no-author, and content its author deleted or a moderator removed answers 404 report/target-not-found. See Create Report.
"entity" | "comment" | "message"
required
The kind of content being reported.
string
required
The ID of the entity, comment, or chat message being reported.
ReportReason
required
One of spam, inappropriateContent, harassment, misinformation, hateSpeech, violence, illegalActivity, selfHarm, other. The API rejects anything else — use other plus details for the rest.
string | null
Additional context about the report. null or an empty string stores none.
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.
Returns — Promise<CreateReportResponse>
The user’s own report of the target, never the shared report other reporters joined: the same record whether this call filed it or the user had already reported the open report. See Create Report.

fetchModeratedReports

Fetches a paginated list of moderated reports, with optional filters.
string
Restrict results to reports within a specific space.
"entity" | "comment" | "message"
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.
"pending" | "on-hold" | "escalated" | "dismissed" | "actioned" | "auto-closed"
Restrict results to reports with a specific moderation status.
"createdAt"
Reports are sorted by when they were created.
"asc" | "desc"
Direction of the createdAt sort. Default "desc" (newest first).
number
The page of results to fetch.
number
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.
Returns — 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 by targetType: the stored entity, comment or chat message record with its author as user (User | null), without the computed fields and associations a regular fetch adds. null when the content can no longer be found.
  • space — the stored record of the space the report was filed in, or null.