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 abehavior 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
reasonis required whenreportTypeisbehavior, and rejected for every other type (and for typeless reports).reasonandcommentare 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 theuserId. Send reason only with a behavior report, and add a comment on any report type when the reporter provides extra detail.
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
AmityUserobject. - Android and Flutter expose flag status from the loaded user model.
Related topics
Get User Information
Retrieve user details and flag status.
Roles and Permissions
Gate moderation actions with permission checks.