List
List chats
client.Chats.List(ctx, query) (*CursorList[ChatListResponse], error)
/v1/chats
List all chats sorted by last activity (most recent first). Combines all accounts into a single paginated list.
Parameters
Returns
List chats
package main
import (
"context"
"fmt"
"github.com/beeper/desktop-api-go"
"github.com/beeper/desktop-api-go/option"
)
func main() {
client := beeperdesktopapi.NewClient(
option.WithAccessToken("My Access Token"),
)
page, err := client.Chats.List(context.TODO(), beeperdesktopapi.ChatListParams{
})
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", page)
}
{
"hasMore": true,
"items": [
{
"id": "!instagram_mattwondra:local-instagram.localhost",
"accountID": "local-instagram_ba_eRfQMmnSNy_p7Ih7HL7RduRpKFU",
"network": "Instagram",
"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",
"preview": {
"id": "1343993",
"accountID": "local-signal_ba_7N74FrU29pxij_TnqfxeUHj53FY",
"chatID": "!signal_adamvy:local-signal.localhost",
"senderID": "@adamvy:local-signal.localhost",
"sortKey": "821744079",
"timestamp": "2025-08-28T11:04:29.621Z",
"attachments": [
{
"type": "unknown",
"duration": 0,
"fileName": "fileName",
"fileSize": 0,
"isGif": true,
"isSticker": true,
"isVoiceNote": true,
"mimeType": "mimeType",
"posterImg": "posterImg",
"size": {
"height": 0,
"width": 0
},
"srcURL": "srcURL"
}
],
"isSender": false,
"isUnread": false,
"reactions": [
{
"id": "id",
"participantID": "participantID",
"reactionKey": "reactionKey",
"emoji": true,
"imgURL": "imgURL"
}
],
"senderName": "Adam Van Ymeren",
"text": "Hey, can we reschedule our meeting to 3pm?"
}
}
],
"newestCursor": "1725489123456",
"oldestCursor": "1725489123456"
}
Returns Examples
{
"hasMore": true,
"items": [
{
"id": "!instagram_mattwondra:local-instagram.localhost",
"accountID": "local-instagram_ba_eRfQMmnSNy_p7Ih7HL7RduRpKFU",
"network": "Instagram",
"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",
"preview": {
"id": "1343993",
"accountID": "local-signal_ba_7N74FrU29pxij_TnqfxeUHj53FY",
"chatID": "!signal_adamvy:local-signal.localhost",
"senderID": "@adamvy:local-signal.localhost",
"sortKey": "821744079",
"timestamp": "2025-08-28T11:04:29.621Z",
"attachments": [
{
"type": "unknown",
"duration": 0,
"fileName": "fileName",
"fileSize": 0,
"isGif": true,
"isSticker": true,
"isVoiceNote": true,
"mimeType": "mimeType",
"posterImg": "posterImg",
"size": {
"height": 0,
"width": 0
},
"srcURL": "srcURL"
}
],
"isSender": false,
"isUnread": false,
"reactions": [
{
"id": "id",
"participantID": "participantID",
"reactionKey": "reactionKey",
"emoji": true,
"imgURL": "imgURL"
}
],
"senderName": "Adam Van Ymeren",
"text": "Hey, can we reschedule our meeting to 3pm?"
}
}
],
"newestCursor": "1725489123456",
"oldestCursor": "1725489123456"
}