## Retrieve `$client->chats->retrieve(string chatID, ?int maxParticipantCount): Chat` **get** `/v1/chats/{chatID}` Retrieve chat details including metadata, participants, and latest message ### Parameters - `chatID: string` Unique identifier of the chat. - `maxParticipantCount?:optional int` Maximum number of participants to return. Use -1 for all; otherwise 0–500. Defaults to all (-1). ### Returns - `Chat` - `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. ### Example ```php chats->retrieve( '!NCdzlIaMjZUmvmvyHU:beeper.com', maxParticipantCount: 50 ); var_dump($chat); ```