Skip to main content
GET
/
conversations
/
get-messages
Get Messages
curl --request GET \
  --url http://localhost:3000/api/conversations/get-messages
{
  "messages": [
    {
      "id": "<string>",
      "senderId": "<string>",
      "content": "<string>",
      "timestamp": 123,
      "readBy": [
        "<string>"
      ],
      "type": "<string>"
    }
  ],
  "hasMore": true,
  "nextCursor": "<string>"
}

Query Parameters

conversationId
string
required

The ID of the conversation

limit
integer
default:50

Maximum number of messages to retrieve

lastMessageId
string

Cursor for pagination - ID of the last message from previous request

Response

Messages retrieved successfully

messages
object[]
hasMore
boolean

Whether there are more messages available

nextCursor
string

Cursor for fetching the next page of messages