Skip to content
Download Beeper

Retrieve chat details

$client->chats->retrieve(string chatID, ?int maxParticipantCount): Chat
GET/v1/chats/{chatID}

Retrieve chat details including metadata, participants, and latest message

ParametersExpand Collapse
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).

ReturnsExpand Collapse
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.

Retrieve chat details

<?php

require_once dirname(__DIR__) . '/vendor/autoload.php';

$client = new Client();

$chat = $client->chats->retrieve(
  '!NCdzlIaMjZUmvmvyHU:beeper.com', maxParticipantCount: 50
);

var_dump($chat);
{
  "id": "!instagram_mattwondra:local-instagram.localhost",
  "accountID": "local-instagram_ba_eRfQMmnSNy_p7Ih7HL7RduRpKFU",
  "participants": {
    "hasMore": false,
    "items": [
      {
        "id": "@mattwondra:local-instagram.localhost",
        "cannotMessage": false,
        "email": "email",
        "fullName": "Matt Wondra",
        "imgURL": "imgURL",
        "isSelf": false,
        "phoneNumber": "phoneNumber",
        "username": "mattwondra"
      },
      {
        "id": "@batuhan:local-instagram.localhost",
        "cannotMessage": false,
        "email": "email",
        "fullName": "Batuhan İçöz",
        "imgURL": "imgURL",
        "isSelf": true,
        "phoneNumber": "phoneNumber",
        "username": "batuhan"
      }
    ],
    "total": 2
  },
  "title": "Matt Wondra",
  "type": "single",
  "unreadCount": 0,
  "isArchived": false,
  "isMuted": false,
  "isPinned": false,
  "lastActivity": "2025-08-31T19:41:41.000Z",
  "lastReadMessageSortKey": "449706228480",
  "localChatID": "1229391"
}
Returns Examples
{
  "id": "!instagram_mattwondra:local-instagram.localhost",
  "accountID": "local-instagram_ba_eRfQMmnSNy_p7Ih7HL7RduRpKFU",
  "participants": {
    "hasMore": false,
    "items": [
      {
        "id": "@mattwondra:local-instagram.localhost",
        "cannotMessage": false,
        "email": "email",
        "fullName": "Matt Wondra",
        "imgURL": "imgURL",
        "isSelf": false,
        "phoneNumber": "phoneNumber",
        "username": "mattwondra"
      },
      {
        "id": "@batuhan:local-instagram.localhost",
        "cannotMessage": false,
        "email": "email",
        "fullName": "Batuhan İçöz",
        "imgURL": "imgURL",
        "isSelf": true,
        "phoneNumber": "phoneNumber",
        "username": "batuhan"
      }
    ],
    "total": 2
  },
  "title": "Matt Wondra",
  "type": "single",
  "unreadCount": 0,
  "isArchived": false,
  "isMuted": false,
  "isPinned": false,
  "lastActivity": "2025-08-31T19:41:41.000Z",
  "lastReadMessageSortKey": "449706228480",
  "localChatID": "1229391"
}