Skip to main content
  • backward: Fetch most recent messages first. Pagination moves toward older messages. This is the default, suitable for loading a chat view (show latest messages first).
  • forward: Fetch oldest messages first. Pagination moves toward newer messages. Suitable for iterating through message history from the beginning.
In both directions, messages within each page are returned in chronological order (oldest first), which is the natural reading order for chat messages.