Skip to main content

Overview

Returns a function to fetch content reports (entities and comments) from spaces where the current user has an admin or moderator role. If spaceId is provided, returns reports for that specific space (the user must moderate it). If omitted, returns reports aggregated from all spaces the user moderates.
Requires an authenticated user with admin or moderator role in at least one space.

Usage Example

Parameters

string
Filter reports to a specific space. If omitted, returns reports from all spaces the user moderates.
"comment" | "entity" | "message"
Filter by target type.
"pending" | "on-hold" | "escalated" | "dismissed" | "actioned" | "auto-closed"
Filter by report status.
"createdAt"
Reports are sorted by when they were created.
"asc" | "desc"
Direction of the createdAt sort. Default "desc" (newest first).
number
Page number for pagination. Defaults to 1.
number
Items 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

Returns Promise<PaginatedResponse<Report>>:

Report object

string
UUID of the report record.
string | null
Space the reported content belongs to.
string
ID of the reported entity, comment, or chat message.
"comment" | "entity" | "message"
Type of the reported content.
number
Total number of users who have reported this target.
array
Individual user report entries. Each includes id, reportId, userId, reason, details, createdAt and updatedAt.
string
Current moderation status: pending, on-hold, escalated, dismissed, actioned, or auto-closed (closed by the system with no moderator decision; the reason is in actionTaken).
string | null
Free-text description of action taken, if any.
ReportEntityTarget | ReportCommentTarget | ReportMessageTarget | null
The reported content’s stored record, with its author as user (a public User, or null); the fields a regular fetch computes or joins, such as userReaction or files, aren’t included. null when the content is no longer there, including an entity soft-deleted under the project’s entity deletion setting. When spaceReputation is requested, the embedded author carries an added spaceReputation number. See Reputation.
Space | null
The space the report was filed in, as its stored record: without membersCount, childSpacesCount, isMember or the avatar and banner file objects. null when the report has no space.
string
When the first report for this target was submitted.
string
When the report record was last updated.

Notes

  • Message reports appear in this queue only for conversations attached to a space. DM and group chat reports have no space, so they are project-level and appear only in the Sublay dashboard — see useCreateReport.