Skip to main content
POST
/
messages
/
{id}
/
reactions
/
{reaction}
Add reaction
curl --request POST \
  --url https://{appId}.api-{region}.cometchat.io/v3/messages/{id}/reactions/{reaction} \
  --header 'apikey: <api-key>' \
  --header 'onBehalfOf: <onbehalfof>'
{
  "data": {
    "id": "2",
    "conversationId": "cometchat-uid-1_user_cometchat-uid-2",
    "sender": "cometchat-uid-1",
    "receiverType": "user",
    "receiver": "cometchat-uid-2",
    "category": "message",
    "type": "text",
    "data": {
      "text": "Hi,",
      "entities": {
        "sender": {
          "entity": {
            "uid": "cometchat-uid-1",
            "name": "Andrew Joseph",
            "role": "default",
            "status": "offline"
          },
          "entityType": "user"
        },
        "receiver": {
          "entity": {
            "uid": "cometchat-uid-2",
            "name": "George Alan",
            "role": "default",
            "status": "offline",
            "conversationId": "cometchat-uid-1_user_cometchat-uid-2"
          },
          "entityType": "user"
        }
      },
      "reactions": [
        {
          "reaction": ":reaction",
          "count": 1
        },
        {
          "reaction": "๐Ÿ˜…",
          "count": 1
        },
        {
          "reaction": "๐Ÿ˜’",
          "count": 1,
          "reactedByMe": true
        },
        {
          "reaction": "๐Ÿคจ",
          "count": 1,
          "reactedByMe": true
        }
      ]
    },
    "sentAt": 1700210266,
    "updatedAt": 1700210266
  }
}

Documentation Index

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

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

For the complete error reference, see Error Guide.

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 to react.

reaction
string
required

reaction to react.

Response

200 - application/json

Adding reaction

data
object