Skip to main content
GET
Get messages from a chat

Authorizations

Authorization
string
header
required

Bearer token authentication. Include your API token in the Authorization header.

Format: Authorization: Bearer <your-token>

Path Parameters

chatId
string<uuid>
required

Unique identifier of the chat

Query Parameters

cursor
string

Pagination cursor from previous next_cursor response

limit
integer
default:50

Maximum number of messages to return

Required range: 1 <= x <= 100
order
enum<string>
default:asc

Sort order for messages (asc = oldest first, desc = newest first). A cursor is only valid with the order it was returned for.

Available options:
asc,
desc
thread_originator_message_id
string<uuid>

Return one thread only, in time order, with no group-history events. The result is the Message that opened the thread plus every Message whose thread.originator_message_id is that Message, so a reply to a reply is included. Answers 404 when the Message is not in this Chat or the caller cannot see it. A cursor from a thread list is only valid with the same thread.

Response

Messages retrieved successfully

messages
object[]
required

List of messages

next_cursor
string | null

Cursor for fetching the next page of results. Null if there are no more results to fetch. Pass this value as the cursor parameter in the next request.