> ## Documentation Index
> Fetch the complete documentation index at: https://www.cometchat.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

> Flag a message for moderation review.

# Flag a message



## OpenAPI

````yaml post /messages/{id}/flagged
openapi: 3.0.0
info:
  title: Chat APIs
  description: Manage messages, users, groups for a particular app using our Chat API.
  version: '3.0'
servers:
  - url: https://{appId}.api-{region}.cometchat.io/v3
    variables:
      appId:
        default: appId
        description: (Required) App ID
      region:
        enum:
          - us
          - eu
          - in
        default: us
        description: Select Region
security: []
tags:
  - name: API Keys
    description: The API keys are used to authorise the APIs
  - name: Roles
    description: The roles are used to give user access rights
  - name: Users
    description: The REST collection for users.
  - name: Auth Tokens
    description: The auth tokens are used to login end users using client SDKs.
  - name: Blocked Users
    description: The REST collections for blocked users.
  - name: Friends
    description: List,add and remove friends by passing UID in path variables
  - name: Groups
    description: The REST collections for groups.
  - name: Banned Users
    description: Ban and Unban user by passing other UID in path variables.
  - name: Group Members
    description: The REST collections for group members.
  - name: Messages
    description: The REST collections for messages.
  - name: Conversations
    description: The REST collections for conversations.
  - name: Restrict Features
    description: Allows Restricting Features
  - name: Metrics
    description: Allows accessing Data Metrics
  - name: Triggers
    description: Allows adding triggers to a webhook.
  - name: Webhooks
    description: Allows accessing Webhooks.
  - name: Notifications
    description: Allows configuring Notifications core.
paths:
  /messages/{id}/flagged:
    post:
      tags:
        - Moderation - Flagged Messages
      summary: Flag a message
      description: >-
        Flags a specific message for moderation review. The flagged message is
        presented to a moderator for evaluation, who can then decide to either
        block the message or approve it based on the review outcome.
      operationId: flag-a-message
      parameters:
        - $ref: 9583bb2d-0c28-4749-bb1d-208fb77978d9
        - name: id
          in: path
          required: true
          schema:
            type: string
          description: Id of the message to be flagged.
        - name: onBehalfOf
          in: header
          description: UID of the user on whose behalf the action is performed.
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                reasonId:
                  type: string
                  description: >-
                    Unique identifier of the moderation reason used to flag the
                    message.
                remark:
                  type: string
                  description: >-
                    Additional remark or comment about why the message is being
                    flagged.
      responses:
        '200':
          description: Message flagged successfully.
          content:
            application/json:
              schema:
                properties:
                  data:
                    type: object
                type: object

````