Skip to main content
GET
/
:projectId
/
api
/
v7
/
conversations
/
:conversationId
/
messages
List Messages
curl --request GET \
  --url https://api.sublay.io/api/v6/:projectId/api/v7/conversations/:conversationId/messages
{
  "messages": [
    {}
  ],
  "hasMore": true,
  "oldestCreatedAt": {},
  "newestCreatedAt": {},
  "notice": "<string>"
}
Returns a cursor-paginated list of ChatMessage objects. By default returns the main conversation stream (excludes thread replies). Pass parentId to fetch replies for a specific thread. The caller must be a member. Former members (who left) can only read messages up to when they left.

Path Parameters

conversationId
string
required
The ID of the conversation.

Query Parameters

parentId
string
If provided, returns thread replies to this message instead of the main stream.
before
string
ISO 8601 timestamp. Returns messages created before this time. Used for loading older messages. Mutually exclusive with after.
after
string
ISO 8601 timestamp. Returns messages created after this time. Used for loading newer messages. Mutually exclusive with before.
limit
number
Number of messages to return. Defaults to 50.
sort
string
Sort order: asc or desc. Defaults to desc for the main stream, asc for threads.
include
string
Comma-separated list of extra fields to include. Currently supports files. Example: include=files.
filters
object
Optional filters object, serialized as bracket-notation query params (e.g. filters[hasReplies]=true).
  • hasReplies (boolean) — When true, returns only messages that have thread replies (threadReplyCount > 0). When false, returns only messages with no thread replies. This filters by thread replies, not quotings (quotedMessageId).
Threads are one level deep — a reply can never have its own replies. So filters[hasReplies]=true combined with parentId always returns an empty list; the response includes a notice field explaining why.

Space-scoped reputation

This endpoint has a space in context, so it accepts the opt-in reputation params. They add a spaceReputation field to each message sender’s user, alongside the always-present reputation total. Requires the reputation bundle. See the Reputation data model for the full contract.
spaceReputationId
string
Adds spaceReputation to each returned user. One of: a space <uuid> (that space’s bucket), none (the project-general bucket), or context (the space derived from this request’s context — per-row on lists). The empty string and the legacy general / null aliases are rejected (400). Missing buckets read as 0.
spaceReputationDescendants
boolean
Only honored with an explicit space <uuid>. When true, spaceReputation is the subtree sum — the space plus all of its descendants (the root space’s own bucket included). Ignored for none; not allowed with context.

Response

messages
ChatMessage[]
Array of message objects. Each includes reactionCounts, userReactions, user, and quotedMessage fields. File attachments are included only when include=files is specified.
hasMore
boolean
Whether more messages exist in the requested direction.
oldestCreatedAt
string | null
ISO timestamp of the oldest message in this page. null if no messages were returned.
newestCreatedAt
string | null
ISO timestamp of the newest message in this page. null if no messages were returned.
notice
string
Present only when a filter combination can’t return results — e.g. hasReplies: true together with parentId. Explains why the list is empty.

Error Responses

{ "error": "You are not a member of this conversation.", "code": "chat/not-a-member" }