## List `$client->chats->list(?list accountIDs, ?string cursor, ?Direction direction): CursorNoLimit` **get** `/v1/chats` List all chats sorted by last activity (most recent first). Combines all accounts into a single paginated list. ### Parameters - `accountIDs?:optional list` Limit to specific account IDs. If omitted, fetches from all accounts. - `cursor?:optional string` Opaque pagination cursor; do not inspect. Use together with 'direction'. - `direction?:optional Direction` Pagination direction used with 'cursor': 'before' fetches older results, 'after' fetches newer results. Defaults to 'before' when only 'cursor' is provided. ### Returns - `ChatListResponse` - `string id` Unique identifier of the chat across Beeper. - `string accountID` Account ID this chat belongs to. - `Participants participants` Chat participants information. - `string title` Display title of the chat as computed by the client/server. - `Type type` Chat type: 'single' for direct messages, 'group' for group chats. - `int unreadCount` Number of unread messages. - `?bool isArchived` True if chat is archived. - `?bool isMuted` True if chat notifications are muted. - `?bool isPinned` True if chat is pinned. - `?\Datetime lastActivity` Timestamp of last activity. - `?string lastReadMessageSortKey` Last read message sortKey. - `?string localChatID` Local chat ID specific to this Beeper Desktop installation. - `?Message preview` ### Example ```php chats->list( accountIDs: [ 'local-whatsapp_ba_EvYDBBsZbRQAy3UOSWqG0LuTVkc', 'local-instagram_ba_eRfQMmnSNy_p7Ih7HL7RduRpKFU', ], cursor: '1725489123456|c29tZUltc2dQYWdl', direction: 'before', ); var_dump($page); ```