Realtime Queries
Live query references available via realtime.subscribe and run()
The same queries available as one-time REST calls can also
be used in realtime. Import from @start-chat/sdk/queries and pass to
realtime.subscribe for live updates or run() for a one-shot read through
the sync layer.
serverById
Get server details by ID.
| Parameter | Type | Required |
|---|---|---|
serverId | string | Yes |
serverMembers
List members of a server.
| Parameter | Type | Required |
|---|---|---|
serverId | string | Yes |
limit | number | No |
userServers
List servers the authenticated user belongs to.
| Parameter | Type | Required |
|---|---|---|
userId | string | No |
searchJoinableServers
Search for public servers the user can join.
| Parameter | Type | Required |
|---|---|---|
userId | string | No |
search | string | No |
limit | number | No |
channelsByServer
List all channels in a server.
| Parameter | Type | Required |
|---|---|---|
serverId | string | Yes |
channelById
Get channel details by ID.
| Parameter | Type | Required |
|---|---|---|
channelId | string | Yes |
channelMessages
Fetch messages in a channel. Supports cursor-based pagination, filtering, and limit control.
| Parameter | Type | Required | Description |
|---|---|---|---|
serverId | string | Yes | |
channelId | string | Yes | |
fromOrder | string | No | |
around | 'before' | 'after' | No | before, after |
limit | number | No | |
solo | boolean | No | |
channelFilter | 'thread' | 'chat' | 'app' | 'pinned' | No | thread, chat, app, pinned |
appendingFromOrder | string | No |
messageById
Get a single message by ID.
| Parameter | Type | Required |
|---|---|---|
messageId | string | Yes |
threadWithMessages
Get a thread and all its messages.
| Parameter | Type | Required |
|---|---|---|
threadId | string | Yes |
serverId | string | Yes |
threadById
Get thread metadata by ID.
| Parameter | Type | Required |
|---|---|---|
threadId | string | Yes |
userById
Get user profile by ID.
| Parameter | Type | Required |
|---|---|---|
userId | string | Yes |