Skip to content
Download Beeper

Retrieve chat details

client.Chats.Get(ctx, chatID, query) (*Chat, error)
GET/v1/chats/{chatID}

Retrieve chat details including metadata, participants, and latest message

ParametersExpand Collapse
chatID string

Unique identifier of the chat.

query ChatGetParams
MaxParticipantCount param.Field[int64]optional

Maximum number of participants to return. Use -1 for all; otherwise 0–500. Defaults to all (-1).

minimum-1
maximum500
ReturnsExpand Collapse
type Chat struct{…}
ID string

Unique identifier of the chat across Beeper.

AccountID string

Account ID this chat belongs to.

Participants ChatParticipants

Chat participants information.

HasMore bool

True if there are more participants than included in items.

Items []User

Participants returned for this chat (limited by the request; may be a subset).

ID string

Stable Beeper user ID. Use as the primary key when referencing a person.

CannotMessage booloptional

True if Beeper cannot initiate messages to this user (e.g., blocked, network restriction, or no DM path). The user may still message you.

Email stringoptional

Email address if known. Not guaranteed verified.

FullName stringoptional

Display name as shown in clients (e.g., 'Alice Example'). May include emojis.

ImgURL stringoptional

Avatar image URL if available. May be temporary or local-only to this device; download promptly if durable access is needed.

IsSelf booloptional

True if this user represents the authenticated account's own identity.

PhoneNumber stringoptional

User's phone number in E.164 format (e.g., '+14155552671'). Omit if unknown.

Username stringoptional

Human-readable handle if available (e.g., '@alice'). May be network-specific and not globally unique.

Total int64

Total number of participants in the chat.

Title string

Display title of the chat as computed by the client/server.

Type ChatType

Chat type: 'single' for direct messages, 'group' for group chats.

Accepts one of the following:
const ChatTypeSingle ChatType = "single"
const ChatTypeGroup ChatType = "group"
UnreadCount int64

Number of unread messages.

IsArchived booloptional

True if chat is archived.

IsMuted booloptional

True if chat notifications are muted.

IsPinned booloptional

True if chat is pinned.

LastActivity Timeoptional

Timestamp of last activity.

formatdate-time
LastReadMessageSortKey stringoptional

Last read message sortKey.

LocalChatID stringoptional

Local chat ID specific to this Beeper Desktop installation.

Retrieve chat details

package main

import (
  "context"
  "fmt"

  "github.com/beeper/desktop-api-go"
)

func main() {
  client := beeperdesktopapi.NewClient(

  )
  chat, err := client.Chats.Get(
    context.TODO(),
    "!NCdzlIaMjZUmvmvyHU:beeper.com",
    beeperdesktopapi.ChatGetParams{

    },
  )
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", chat.ID)
}
{
  "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"
}