Skip to main content
PUT
/
moderation
/
messages
/
{id}
Update message
curl --request PUT \
  --url https://{appid}.api-{region}.cometchat.io/v3/moderation/messages/{id} \
  --header 'Content-Type: application/json' \
  --header 'apikey: <api-key>' \
  --data '
{
  "data": {
    "text": "This message has been updated."
  }
}
'
{
  "data": {
    "id": "1",
    "conversationId": "cometchat-uid-1_user_cometchat-uid-2",
    "sender": "cometchat-uid-2",
    "receiverType": "user",
    "receiver": "cometchat-uid-1",
    "category": "message",
    "type": "text",
    "data": {
      "text": "heyaya, I'm updated",
      "entities": {
        "receiver": {
          "entity": {
            "avatar": "https://assets.cometchat.io/sampleapp/v2/users/cometchat-uid-1.webp",
            "createdAt": 1751644824,
            "lastActiveAt": 1751644824,
            "name": "Andrew Joseph",
            "role": "default",
            "status": "offline",
            "uid": "cometchat-uid-1"
          },
          "entityType": "user"
        },
        "sender": {
          "entity": {
            "avatar": "https://assets.cometchat.io/sampleapp/v2/users/cometchat-uid-2.webp",
            "conversationId": "cometchat-uid-1_user_cometchat-uid-2",
            "createdAt": 1751644824,
            "lastActiveAt": 1751644824,
            "name": "George Alan",
            "role": "default",
            "status": "offline",
            "uid": "cometchat-uid-2"
          },
          "entityType": "user"
        }
      },
      "moderation": {
        "status": "approved"
      }
    },
    "sentAt": 1750335220,
    "editedAt": 1751645607,
    "editedBy": "cometchat-uid-1",
    "updatedAt": 1751644906
  }
}

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).

Path Parameters

id
string
required

Id of the message whose details are to be fetched.

Body

application/json
data
object

Can contain any additional properties except for the key properties.

Response

200 - application/json

Update Message(s)

The response is of type object.