Skip to main content
GET
/
messages
/
{id}
/
thread
List Threaded Messages
curl --request GET \
  --url https://{appId}.api-{region}.cometchat.io/v3/messages/{id}/thread \
  --header 'apikey: <api-key>'
{
  "data": [
    {
      "id": "2",
      "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",
        "entities": {
          "sender": {
            "entity": {
              "uid": "cometchat-uid-3",
              "name": "Nancy Grace",
              "role": "default",
              "avatar": "https://assets.cometchat.io/sampleapp/v2/users/cometchat-uid-3.webp",
              "status": "offline",
              "createdAt": 1638361550
            },
            "entityType": "user"
          },
          "receiver": {
            "entity": {
              "uid": "cometchat-uid-5",
              "name": "John Paul",
              "role": "default",
              "avatar": "https://assets.cometchat.io/sampleapp/v2/users/cometchat-uid-5.webp",
              "status": "offline",
              "createdAt": 1638361550,
              "conversationId": "cometchat-uid-3_user_cometchat-uid-5"
            },
            "entityType": "user"
          }
        },
        "metadata": {
          "key1": "val1"
        }
      },
      "sentAt": 1638423490,
      "updatedAt": 1638423490,
      "parentId": "1"
    }
  ],
  "meta": {
    "current": {
      "limit": 10,
      "count": 1
    },
    "next": {
      "affix": "append",
      "sentAt": 1638423490,
      "id": "3"
    }
  }
}

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 thread messages are to be fetched.

Query Parameters

perPage
number
default:100

Number of threaded messages to return per page.

page
number
default:1

Page number for paginated results.

Response

200 - application/json

Create Message

data
object[]
meta
object