Skip to content
Download Beeper

List contacts

client.Accounts.Contacts.List(ctx, accountID, query) (*CursorSearch[User], error)
GET/v1/accounts/{accountID}/contacts/list

List merged contacts for a specific account with cursor-based pagination.

ParametersExpand Collapse
accountID string

Account ID this resource belongs to.

query AccountContactListParams
Cursor param.Field[string]optional

Opaque pagination cursor; do not inspect. Use together with 'direction'.

Direction param.Field[AccountContactListParamsDirection]optional

Pagination direction used with 'cursor': 'before' fetches older results, 'after' fetches newer results. Defaults to 'before' when only 'cursor' is provided.

const AccountContactListParamsDirectionAfter AccountContactListParamsDirection = "after"
const AccountContactListParamsDirectionBefore AccountContactListParamsDirection = "before"
Limit param.Field[int64]optional

Maximum contacts to return per page.

minimum1
maximum200
Query param.Field[string]optional

Optional search query for blended contact lookup.

minLength1
ReturnsExpand Collapse
type User struct{…}

User the account belongs to.

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.

List contacts

package main

import (
  "context"
  "fmt"

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

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

  )
  page, err := client.Accounts.Contacts.List(
    context.TODO(),
    "accountID",
    beeperdesktopapi.AccountContactListParams{

    },
  )
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", page)
}
{
  "hasMore": true,
  "items": [
    {
      "id": "id",
      "cannotMessage": true,
      "email": "email",
      "fullName": "fullName",
      "imgURL": "imgURL",
      "isSelf": true,
      "phoneNumber": "phoneNumber",
      "username": "username"
    }
  ],
  "newestCursor": "newestCursor",
  "oldestCursor": "oldestCursor"
}
Returns Examples
{
  "hasMore": true,
  "items": [
    {
      "id": "id",
      "cannotMessage": true,
      "email": "email",
      "fullName": "fullName",
      "imgURL": "imgURL",
      "isSelf": true,
      "phoneNumber": "phoneNumber",
      "username": "username"
    }
  ],
  "newestCursor": "newestCursor",
  "oldestCursor": "oldestCursor"
}