Skip to main content
Use user flagging when a member reports another user for moderator review. Flagging does not block, ban, or delete the user; it records reporting state that moderation workflows can review. You can send a simple flag (just the userId) or an optional structured report that describes what is being reported and why — see Add a report type, reason, and comment.
Flutter exposes flag and unflag actions from an AmityUser object. TypeScript, iOS, and Android expose repository methods that take a userId.
The structured report fields (reportType, reason, comment) are optional and backward compatible. A flag call with no report fields behaves exactly as before. These fields are recorded for moderators and are not returned in the API response.

Parameters

Flag a user

Call the flag API when the current user reports another user.

Inputs

Add a report type, reason, and comment (optional)

When you want moderators to know what part of a profile is being reported and why, attach one or more optional fields to the flag call.

Report types

reportType uses fixed values; your app decides the label to show the member.

Reasons

For a behavior report, pass a reason from the shared content report-reason list (the same values used when flagging posts, comments, and messages): communityGuidelines, harassmentOrBullying, selfHarmOrSuicide, violenceOrThreateningContent, sellingRestrictedItems, sexualContentOrNudity, spamOrScams, falseInformation, or others with a custom string.

Rules

  • reason is required when reportType is behavior, and rejected for every other type (and for typeless reports).
  • reason and comment are each capped at 300 characters.
  • A member holds one report per report type on a target (up to four typed reports plus one typeless). Reporting the same type again updates that report; reporting a different type adds a new one.
  • Unflagging removes all of your reports on that user at once — there is no per-type unflag.
  • Breaking a rule returns a validation error (HTTP 422) from the server.

Examples

Pass the optional fields alongside the userId. Send reason only with a behavior report, and add a comment on any report type when the reporter provides extra detail.
To report more than one aspect of the same profile (for example the avatar and the behavior), send a separate flag call for each reportType. They are stored as distinct reports.

Unflag a user

Call the unflag API when the current user removes their report from another user.

Inputs

Check whether the current user flagged a user

Use the flag-state API or property to decide whether to show a flag or unflag action.

Inputs

Platform notes

  • Flagging is a report signal for moderation review; it does not automatically block, ban, or delete the user.
  • TypeScript, iOS, and Android flag by userId.
  • Flutter flags through the loaded AmityUser object.
  • Android and Flutter expose flag status from the loaded user model.

Get User Information

Retrieve user details and flag status.

Roles and Permissions

Gate moderation actions with permission checks.