Skip to main content

Overview

Returns a function that allows a space moderator to take action on a chat message report. Available actions are: remove the message, ban the message’s author from the space, or dismiss the report.
Requires the authenticated user to have admin or moderator role in the target space.
ban-user here is space-scoped — it sets the target’s space membership to banned. Project-wide suspension is a separate, dashboard-only action; a space moderator cannot suspend a user across the whole project.

Usage Example

Parameters

string
required
The ID of the space the report belongs to.
string
required
The ID of the report to action.
string
The ID of the reported message. Required when remove-message is included in actions.
Array<'remove-message' | 'ban-user' | 'dismiss'>
required
One or more actions to take:
  • remove-message — Removes the message.
  • ban-user — Bans the message’s author from the space (requires userId).
  • dismiss — Marks the report as dismissed.
string
A moderator note describing the action taken.
string
The ID of the user to ban — the ban target, not the moderator. Required when ban-user is included in actions.
string
The reason for banning, if applicable.
string
The moderator the action is attributed to. Service and master keys only.

Returns

Returns Promise<{ message: string; code: string }>.

Notes