> ## Documentation Index
> Fetch the complete documentation index at: https://docs.replyke.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Report message

> Report a chat message for moderation review

## Overview

Returns an async function that submits a moderation report for a chat message. The report is visible to space moderators and admins in the dashboard.

<Note>Requires `ChatProvider` in the component tree.</Note>

## Usage Example

```tsx theme={null}
import { useReportMessage } from "@replyke/react-js";

function MessageContextMenu({
  conversationId,
  messageId,
}: {
  conversationId: string;
  messageId: string;
}) {
  const report = useReportMessage();

  const handleReport = async () => {
    await report({
      conversationId,
      messageId,
      reason: "spam",
      details: "This message is advertising unrelated products.",
    });
    alert("Report submitted.");
  };

  return <button onClick={handleReport}>Report message</button>;
}
```

## Parameters

The hook returns a function. That function accepts:

<ParamField body="conversationId" type="string" required>
  The ID of the conversation that contains the message.
</ParamField>

<ParamField body="messageId" type="string" required>
  The ID of the message to report.
</ParamField>

<ParamField body="reason" type="string">
  A short reason for the report (e.g. `"spam"`, `"harassment"`).
</ParamField>

<ParamField body="details" type="string">
  Additional context or description of the issue.
</ParamField>

## Returns

`Promise<void>`

## Notes

* For integration guidance, see [Chat: Messages](/sdk/chat/messages).
