> ## 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.
</Note>

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

## Query Parameters

<ParamField query="types" type="string">
  Comma-separated list of conversation types to include. Valid values: `direct`, `group`, `space`. If omitted, all types are returned. Example: `types=direct,group`
</ParamField>

<ParamField query="cursor" type="string">
  The `lastMessageAt` timestamp of the last item in the previous page. Used for cursor pagination. Omit for the first page.
</ParamField>

<ParamField query="cursorCreatedAt" type="string">
  The `createdAt` timestamp of the last item in the previous page. Required together with `cursor` when paginating.
</ParamField>

<ParamField query="limit" type="number">
  Number of conversations to return per page. Defaults to `20`. Maximum `50`.
</ParamField>

<ParamField query="userId" type="string">
  The acting user whose conversations are listed. **Service/master 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.
</ParamField>

## Response

<ResponseField name="conversations" type="ConversationPreview[]">
  Array of conversation preview objects. Each item is a [Conversation](/v8/data-models/conversation) extended with the following fields:

  <Expandable title="ConversationPreview fields">
    <ResponseField name="unreadCount" type="number">
      Number of unread messages in this conversation for the acting user.
    </ResponseField>

    <ResponseField name="memberCount" type="number">
      Number of active members.
    </ResponseField>

    <ResponseField name="mutedUntil" type="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.
    </ResponseField>

    <ResponseField name="mutedForever" type="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.
    </ResponseField>

    <ResponseField name="lastMessage" type="ChatMessage | null">
      The most recent visible [message](/v8/data-models/chat-message) in the conversation, or `null` if there is none. The same object the `message:created` socket event delivers, so both paths render identically.

      <Expandable title="lastMessage fields">
        <ResponseField name="id" type="string">
          UUID of the message.
        </ResponseField>

        <ResponseField name="conversationId" type="string">
          UUID of the conversation the message belongs to.
        </ResponseField>

        <ResponseField name="content" type="string | null">
          Message text, **truncated to 100 characters** for list performance. Fetch the message itself for the full content.
        </ResponseField>

        <ResponseField name="gif" type="object | null">
          Attached GIF, if the message carries one.
        </ResponseField>

        <ResponseField name="userId" type="string">
          UUID of the sender.
        </ResponseField>

        <ResponseField name="userDeletedAt" type="string | null">
          Set when the sender's account has been deleted.
        </ResponseField>

        <ResponseField name="createdAt" type="string">
          ISO timestamp of when the message was sent.
        </ResponseField>

        <ResponseField name="files" type="File[]">
          Attached [files](/v8/data-models/file), with proxy URLs and image variants resolved. Empty array when the message has no attachments.
        </ResponseField>

        <ResponseField name="user" type="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`.
        </ResponseField>
      </Expandable>
    </ResponseField>

    <ResponseField name="otherMembers" type="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.
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="hasMore" type="boolean">
  Whether more conversations exist beyond this page.
</ResponseField>


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