Skip to main content
GET
/
messages
/
{id}
Get Message
curl --request GET \
  --url https://{appId}.api-{region}.cometchat.io/v3/messages/{id} \
  --header 'apikey: <api-key>'
{
  "data": {
    "id": "1",
    "conversationId": "cometchat-uid-3_user_cometchat-uid-5",
    "sender": "cometchat-uid-3",
    "receiverType": "user",
    "receiver": "cometchat-uid-5",
    "category": "message",
    "type": "text",
    "data": {
      "text": "test     hello",
      "metadata": {
        "key1": "val1"
      },
      "entities": {
        "sender": {
          "entity": {
            "uid": "cometchat-uid-3",
            "name": "Nancy Grace",
            "avatar": "https://assets.cometchat.io/sampleapp/v2/users/cometchat-uid-3.webp",
            "status": "offline",
            "role": "default",
            "createdAt": 1638361550
          },
          "entityType": "user"
        },
        "receiver": {
          "entity": {
            "uid": "cometchat-uid-5",
            "name": "John Paul",
            "avatar": "https://assets.cometchat.io/sampleapp/v2/users/cometchat-uid-5.webp",
            "status": "offline",
            "role": "default",
            "createdAt": 1638361550,
            "conversationId": "cometchat-uid-3_user_cometchat-uid-5"
          },
          "entityType": "user"
        }
      }
    },
    "sentAt": 1638423490,
    "updatedAt": 1638423490
  }
}

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.

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

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

Path Parameters

id
string
required

Id of the message whose details are to be fetched.

Response

200 - application/json

Retreived Message

data
object