Listing Conversations
useConversations fetches the authenticated user’s conversation list with cursor-based pagination. The list is sorted by most recent activity.
types array:
ConversationPreview — a Conversation extended with unreadCount and a truncated lastMessage.
The list is live. It reorders on new messages, inserts conversations as they’re created or added (including ones paginated out that receive a new message), removes conversations you leave or that are deleted, and self-heals on socket reconnect — across direct, group, and space chats. You don’t need to refetch it manually. See Real-time › Live Conversation List.
useConversations for the full API.
Creating a Direct Conversation
UseuseCreateDirectConversation to start a 1:1 conversation with another user. If a direct conversation between the two users already exists, the server returns the existing one; the hook resolves to { conversation, created }, with created telling you which happened.
useCreateDirectConversation.
Creating a Group Conversation
Group conversations are created viauseConversations, which exposes a createGroup function:
createGroup resolves to the created conversation. The group’s inbox row is then fetched and added to the conversation list. Pass avatarFile: { file, options } to upload the group’s avatar with it; useConversation().update replaces it the same way, and removeFileIds: [conversation.avatarFileId] removes it.
Accessing a Single Conversation
useConversation fetches full details for one conversation and provides update and deleteConversation actions:
conversation:updated socket events keep it current automatically.
See useConversation.
Managing Members
useConversationMembers loads the member list and exposes add, remove, leave, and role-change actions:
useConversationMembers.
Your own membership and other members’ are separate routes. Your own membership is
/chat/conversations/:conversationId/members/me: GET to check it (useCheckMyConversationMembership), DELETE to leave (leave above). /chat/conversations/:conversationId/members/:userId (remove, change role) is for acting on another member and refuses your own id with 400 chat/own-member-id.Space Conversations
Every Space has a single associated conversation. UseuseFetchSpaceConversation to retrieve it:
useFetchSpaceConversation.
Next Steps
Messages
Send and receive messages in a conversation
Real-time
Typing indicators, unread counts, read receipts

