messages() returns enriched messages on all four SDKs. Each message includes reactions, a reply count, and its reply parent when available. There is no separate enrichedMessages() method.
Option
Default
Description
limit
None
Maximum result count
sentBefore, sentAfter
None
Filter by sent time
insertedBefore, insertedAfter
None
Filter by local insertion time
sortBy
Sent time
Sort by sent or inserted time
direction
Ascending
Ascending or descending
deliveryStatus
All
Published, unpublished, or failed
kind
All
Application or membership change
contentTypes, excludeContentTypes
All / none
Include or exclude content types
excludeSenderInboxIds
None
Exclude sender inbox IDs
Time filters use Timestamp values. A Timestamp has an ns field for nanoseconds. Pass direction when order matters.
countMessages(options) returns a count without loading messages. It accepts ListMessagesOptions, but ignores limit, direction, and sortBy.
By default, messages are sorted by sentAt. A message can arrive after a newer message. Use insertedAt to paginate the local history by insertion time on all four SDKs.
A timestamp-only cursor can skip messages that have the same timestamp at a page boundary. For recent history followed by live delivery, use a message history snapshot and delivery cursor. A snapshot is a bounded recent tail. To replay all retained delivery history, start an independent reader at client.conversations.beginningDeliveryCursor() in each SDK.
Here is how to paginate messages with the cursor that each SDK exposes:
These options are available on all four SDKs. Time bounds use Timestamp values. Set orderBy to creation time and use createdBefore to paginate. A timestamp-only boundary can skip conversations with the same creation time.
Do not use with streaming
Do not paginate a conversation list while a conversation stream adds items to that same list. Keep the stream and paginated result separate until pagination ends.