> ## Documentation Index
> Fetch the complete documentation index at: https://replyke-feat-push-rich-payload-fields.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Reports

> File content reports against entities and comments, and read the moderation queue

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 or comment. Repeat reports of the same target are deduplicated.

```typescript theme={null}
const { message, code } = await sublay.reports.createReport({
  targetType: "comment",
  targetId: "cmt_abc123",
  reason: "spam",
  details: "Posting the same link repeatedly.",
});
```

<ParamField body="targetType" type="&#x22;entity&#x22; | &#x22;comment&#x22;" required>
  The kind of content being reported.
</ParamField>

<ParamField body="targetId" type="string" required>
  The ID of the entity or comment being reported.
</ParamField>

<ParamField body="reason" type="string" required>
  The reason for the report.
</ParamField>

<ParamField body="details" type="string">
  Additional context about the report.
</ParamField>

**Returns** — `Promise<{ message: string; code: "report/created" | "report/updated" | "report/already-reported" }>`

***

### fetchModeratedReports

Fetches a paginated list of moderated reports, with optional filters.

```typescript theme={null}
const { data, pagination } = await sublay.reports.fetchModeratedReports({
  status: "pending",
  sortBy: "new",
  page: 1,
  limit: 20,
});
```

<ParamField body="spaceId" type="string">
  Restrict results to reports within a specific space.
</ParamField>

<ParamField body="targetType" type="&#x22;entity&#x22; | &#x22;comment&#x22;">
  Restrict results to reports of a specific target type.
</ParamField>

<ParamField body="status" type="&#x22;pending&#x22; | &#x22;on-hold&#x22; | &#x22;escalated&#x22; | &#x22;dismissed&#x22; | &#x22;actioned&#x22;">
  Restrict results to reports with a specific moderation status.
</ParamField>

<ParamField body="sortBy" type="&#x22;new&#x22; | &#x22;old&#x22;">
  Sort order for the returned reports.
</ParamField>

<ParamField body="page" type="number">
  The page of results to fetch.
</ParamField>

<ParamField body="limit" type="number">
  The number of reports to return per page.
</ParamField>

<ParamField body="spaceReputationId" type="string">
  Opts each reported target's author into a `spaceReputation` number. Accepts a space `<uuid>`, `"none"` (the project-general bucket), or `"context"` (the space derived from the request context — per-row from the space each report belongs to). The empty string and the legacy `general` / `null` aliases are rejected. See [Reputation](/data-models/reputation).
</ParamField>

<ParamField body="spaceReputationDescendants" type="boolean">
  Only honored alongside an explicit space `<uuid>`. When `true`, `spaceReputation` is the subtree sum — the named space plus all of its descendants.
</ParamField>

**Returns** — `Promise<PaginatedResponse<Report>>`

Each `Report` carries `id`, `spaceId`, `targetId`, `targetType`, `status`, `reporterCount`, timestamps, and optional `userReports`, `target`, and `space` associations.
