TypeScript, iOS, and Android flag posts and comments with no reason, or with a
reason and an optional detail. Flutter flags posts and comments without a
reason; its public post and comment flag builders do not accept a reason yet.
SDK surfaces
Posts
Flag and unflag posts through the post repository or post model extension, depending on platform.
Comments
Flag and unflag comments through the comment repository or comment model extension.
Reason and detail
Pick one predefined reason and optionally add the reporter’s own words as detail, for any reason including Others.
Status
Check whether the current user has flagged a loaded post or comment before rendering an unflag action.
Flag reasons
A reason is one fixed category. On Android, iOS, and TypeScript it never carries text: the reporter’s own words always go indetail. Flutter uses these reasons for messages only, and its Others reason carries the text.
Use Child endangerment for content that endangers a child, including suspected child sexual abuse material (CSAM). Send it as its own reason, not as Others with a detail, so these reports reach moderators under their own category. The reason is sent as the exact text
Child endangerment.
On TypeScript, AmityContentFlagReasonType is the same enum as ContentFlagReasonEnum, exported under the name Android and iOS use. Both names work. Before TypeScript 7.31.0, only ContentFlagReasonEnum is exported.
Parameters
A
detail without a reason is not possible: every call that takes detail
also requires reason. On TypeScript, a malformed options object is rejected
before any request is sent.Flag a post
Flag a post when a member reports it. Pass a reason when your report menu offers one, and pass the reporter’s text asdetail when they add some. Use the no-reason call when your UI only offers a single “Report” action.
Flag a comment
Flag a comment the same way: no reason, or a reason with an optionaldetail.
Report child endangerment
Flag content that endangers a child with the Child endangerment reason. Adetail is optional, as for any reason. The same reason works for comments and messages, and for user behavior reports.
Build a report-reason picker
On TypeScript and iOS, build your report menu from the SDK’s reason list instead of a hardcoded copy. A reason added in a later SDK release then appears in your menu without a code change.
The key is snake_case, the same on every platform, and never renamed. Use it to look up your translated label, and show the English label when you have no translation for the key.
Never send the key or the label to the server. Pass the enum value as
reason.
Android has no key or label helpers yet. To list the reasons there, iterate
AmityContentFlagReasonType.entries (or values() on Kotlin earlier than 1.9)
and supply your own label for each value.Report with Others
Use the Others reason when none of the categories fit. Put the reporter’s explanation indetail, exactly as for any other reason.
The earlier calls that took only a reason are deprecated but still work:
flagPost(postId, reason) and flagComment(commentId, 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 an ID is not
deprecated.Unflag content
Unflag content when the current user removes their own report from a post or comment.Check flag status
Check flag status before rendering a flag or unflag action for the loaded item.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, which also adds
getContentFlagReasons(),getContentFlagReasonKey(), and theAmityContentFlagReasonTypeexport. Android and iOS add the reason in their next releases; the iOS release also addskeyanddefaultLabeltoAmityContentFlagReasonType. Flutter does not offer it. - On iOS, when you omit
detail, write the reason with its type, for exampleAmityContentFlagReasonType.spamOrScams. The shorthand.spamOrScamson 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 flags posts and comments without a reason.
Related topics
Post Review
Approve or decline posts in review workflows.
Delete Post
Remove posts after a moderation decision.
Delete Comment
Remove comments after a moderation decision.
Community Moderation
Manage community roles, bans, and permissions.
Message Flagging
Flag chat messages with the same reasons and detail.