> ## Documentation Index
> Fetch the complete documentation index at: https://docs.sublay.io/llms.txt
> Use this file to discover all available pages before exploring further.

# List Conversations

> Get the current user's conversations, ordered by most recent activity

Returns a cursor-paginated list of `ConversationPreview` objects for the acting user. Only active memberships are included. Results are ordered by `lastMessageAt` descending (conversations with no messages appear last, ordered by `createdAt`).

> [!NOTE]
>
> A `direct` conversation stays out of both parties' lists until it has a visible last message, so an opened-but-never-sent DM is invisible to the other side. If a DM's only message is later deleted or moderated away, it drops back out of the list and reappears when either party sends again. `group` and `space` conversations appear from creation.

To fetch a single conversation in this same shape — one that was paginated out, or just created — use [Fetch Conversation Preview](https://docs.sublay.io/v7/api-reference/chat/conversations/fetch-conversation-preview.md). Both endpoints are served by the same query, so the shapes stay identical.

## Query Parameters

**types** `string`

Comma-separated list of conversation types to include. Valid values: `direct`, `group`, `space`. If omitted, all types are returned. Example: `types=direct,group`

**cursor** `string`

The `lastMessageAt` timestamp of the last item in the previous page. Used for cursor pagination. Omit for the first page.

**cursorCreatedAt** `string`

The `createdAt` timestamp of the last item in the previous page. Required together with `cursor` when paginating.

**limit** `number`

Number of conversations to return per page. Defaults to `20`. Maximum `50`.

**userId** `string`

The acting user whose conversations are listed. **Service keys only** — a service key must pass it (there is no implicit session user); an end-user token infers it from the auth token and may not name a different user.

## Response

**conversations** `ConversationPreview[]`

Array of conversation preview objects. Each item is a [Conversation](https://docs.sublay.io/v7/data-models/conversation.md) extended with the following fields:

**ConversationPreview fields**

**unreadCount** `number`

Number of unread messages in this conversation for the acting user.

**memberCount** `number`

Number of active members.

**mutedUntil** `string | null`

ISO timestamp until which the acting user has muted this conversation. `null` when the conversation is not muted, and also when it is muted forever.

**mutedForever** `boolean`

Whether the acting user has muted this conversation indefinitely. A forever mute returns `mutedForever: true` with `mutedUntil: null` — the far-future storage sentinel is never exposed as a date. Read the boolean; never string-match a date.

**lastMessage** `ChatMessage | null`

The most recent visible [message](https://docs.sublay.io/v7/data-models/chat-message.md) in the conversation, or `null` if there is none. The same object the `message:created` socket event delivers, so both paths render identically.

**lastMessage fields**

**id** `string`

UUID of the message.

**conversationId** `string`

UUID of the conversation the message belongs to.

**content** `string | null`

Message text, **truncated to 100 characters** for list performance. Fetch the message itself for the full content.

**gif** `object | null`

Attached GIF, if the message carries one.

**userId** `string`

UUID of the sender.

**userDeletedAt** `string | null`

Set when the sender's account has been deleted.

**createdAt** `string`

ISO timestamp of when the message was sent.

**files** `File[]`

Attached [files](https://docs.sublay.io/v7/data-models/file.md), with proxy URLs and image variants resolved. Empty array when the message has no attachments.

**user** `object | null`

Sender identity (`id`, `name`, `username`, `avatar`, `reputation`) — populated for `group` and `space` conversations only. Always `null` for `direct` conversations, where the counterparty is already in `otherMembers`.

**otherMembers** `object[]`

Up to 5 active members of the conversation other than the acting user, each with public user fields (`id`, `name`, `username`, `avatar`). Populated for `direct` and `group` conversations only — a DM/group has no `name`, so the counterparty is how a client renders the title and avatar. Capped at 5 (a preview avatar stack needs a few, not all — use `memberCount` for the full group total). Always an empty array (`[]`) for `space` conversations, whose membership can be large and which carry their own `name`. Ordered by member join time.

**hasMore** `boolean`

Whether more conversations exist beyond this page.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.