Skip to main content
Use message flagging when a signed-in user reports a chat message. The SDKs expose three client-side actions: flag a message, unflag a message, and check whether the current user has already flagged a fetched message. Flagged messages are sent to the moderation backend. Keep product policy, review workflow, and enforcement copy outside the SDK integration layer so this page stays focused on the calls your app makes.

Platform Surface

Parameters

Flag A Message

Flag a message with a reason so your product can route it into review, and add the reporter’s own words as detail when they give some. Use the no-reason call when your UI only offers a single “Report” action.

Report Child Endangerment

Flag a message that endangers a child, including suspected child sexual abuse material (CSAM), with the Child endangerment reason. Send it as its own reason, not as Others with a detail, so these reports reach moderators under their own category. A detail is optional.

Report With Others

Use the Others reason when none of the categories fit. On Android, iOS, and TypeScript, put the reporter’s explanation in detail, as for any other reason. Flutter carries the text on its Others reason.
The earlier calls that took only a reason are deprecated but still work on Android, iOS, and TypeScript: flagMessage(messageId, reason) with a reason string on TypeScript, and with AmityContentFlagReason on Android and iOS, where custom text was passed as Others("...") / .others("..."). Move custom text to detail with the Others reason. Flagging with only a message ID is not deprecated on these platforms. On Flutter, the repository flag(messageId) is deprecated; use flagMessage(messageId:reason:).

Unflag A Message

Remove the current user’s flag from a message when the user reverses the report action.

Check Flag State

TypeScript and iOS can ask the repository for the current user’s flag state by message ID. Android and Flutter expose the state on fetched message objects. Read flag state before rendering selected or disabled report controls.

Platform Notes

  • Reason with optional detail ships in TypeScript 7.29.0 and in the October 2026 iOS and Android releases.
  • The Child endangerment reason ships in TypeScript 7.31.0 and in the next Android and iOS releases. Flutter’s AmityContentFlagReason does not include it.
  • On iOS, when you omit detail, write the reason with its type, for example AmityContentFlagReasonType.spamOrScams. The shorthand .spamOrScams on its own selects the deprecated call.
  • A flag without a reason is recorded with a default reason: Others on TypeScript and Android, and Against community guidelines on iOS.
  • Flutter has no separate detail; the reporter’s text travels on AmityContentFlagReason.others(...).

Query Messages

Refresh list state after flag or unflag actions.

Edit and Delete Messages

Modify or soft-delete your own messages.

Content Moderation

Connect message reports to your moderation operating model.