Skip to main content
POST
/
messages
/
{id}
/
flagged
Flag a message
curl --request POST \
  --url https://{appid}.api-{region}.cometchat.io/v3/messages/{id}/flagged \
  --header 'Content-Type: application/json' \
  --header 'apikey: <api-key>' \
  --header 'onBehalfOf: <onbehalfof>' \
  --data '{
  "id": "spam"
}'
{
  "success": true,
  "message": "Message 540092 has been flagged successfully."
}

Documentation Index

Fetch the complete documentation index at: https://cometchat-22654f5b-docs-v6-beta2-flutter-uikit.mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

apikey
string
header
required

API Key with fullAccess scope(i.e. Rest API Key from the Dashboard).

Headers

onBehalfOf
string
required

UID of the user on whose behalf the action is performed.

Path Parameters

id
string
required

Id of the message of the message to be flagged.

Body

application/json
id
string
required

Unique identifier of the moderation reason used to flag the message.

Example:

"spam"

Response

200 - application/json

Delete Reasons

The response is of type object.