# Accounts ## List `client.accounts.list(RequestOptionsoptions?): AccountListResponse` **get** `/v1/accounts` Lists chat accounts across networks (WhatsApp, Telegram, Twitter/X, etc.) actively connected to this Beeper Desktop instance ### Returns - `AccountListResponse = Array` Connected accounts the user can act through. Includes accountID and user identity. - `accountID: string` Chat account added to Beeper. Use this to route account-scoped actions. - `user: User` User the account belongs to. - `id: string` Stable Beeper user ID. Use as the primary key when referencing a person. - `cannotMessage?: boolean` 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?: string` Email address if known. Not guaranteed verified. - `fullName?: string` Display name as shown in clients (e.g., 'Alice Example'). May include emojis. - `imgURL?: string` Avatar image URL if available. May be temporary or local-only to this device; download promptly if durable access is needed. - `isSelf?: boolean` True if this user represents the authenticated account's own identity. - `phoneNumber?: string` User's phone number in E.164 format (e.g., '+14155552671'). Omit if unknown. - `username?: string` Human-readable handle if available (e.g., '@alice'). May be network-specific and not globally unique. ### Example ```typescript import BeeperDesktop from '@beeper/desktop-api'; const client = new BeeperDesktop(); const accounts = await client.accounts.list(); console.log(accounts); ``` ## Domain Types ### Account - `Account` A chat account added to Beeper - `accountID: string` Chat account added to Beeper. Use this to route account-scoped actions. - `user: User` User the account belongs to. - `id: string` Stable Beeper user ID. Use as the primary key when referencing a person. - `cannotMessage?: boolean` 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?: string` Email address if known. Not guaranteed verified. - `fullName?: string` Display name as shown in clients (e.g., 'Alice Example'). May include emojis. - `imgURL?: string` Avatar image URL if available. May be temporary or local-only to this device; download promptly if durable access is needed. - `isSelf?: boolean` True if this user represents the authenticated account's own identity. - `phoneNumber?: string` User's phone number in E.164 format (e.g., '+14155552671'). Omit if unknown. - `username?: string` Human-readable handle if available (e.g., '@alice'). May be network-specific and not globally unique. # Contacts ## Search `client.accounts.contacts.search(stringaccountID, ContactSearchParamsquery, RequestOptionsoptions?): ContactSearchResponse` **get** `/v1/accounts/{accountID}/contacts` Search contacts on a specific account using merged account contacts, network search, and exact identifier lookup. ### Parameters - `accountID: string` Account ID this resource belongs to. - `query: ContactSearchParams` - `query: string` Text to search users by. Network-specific behavior. ### Returns - `ContactSearchResponse` - `items: Array` - `id: string` Stable Beeper user ID. Use as the primary key when referencing a person. - `cannotMessage?: boolean` 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?: string` Email address if known. Not guaranteed verified. - `fullName?: string` Display name as shown in clients (e.g., 'Alice Example'). May include emojis. - `imgURL?: string` Avatar image URL if available. May be temporary or local-only to this device; download promptly if durable access is needed. - `isSelf?: boolean` True if this user represents the authenticated account's own identity. - `phoneNumber?: string` User's phone number in E.164 format (e.g., '+14155552671'). Omit if unknown. - `username?: string` Human-readable handle if available (e.g., '@alice'). May be network-specific and not globally unique. ### Example ```typescript import BeeperDesktop from '@beeper/desktop-api'; const client = new BeeperDesktop(); const response = await client.accounts.contacts.search('accountID', { query: 'x' }); console.log(response.items); ``` ## List `client.accounts.contacts.list(stringaccountID, ContactListParamsquery?, RequestOptionsoptions?): CursorSearch` **get** `/v1/accounts/{accountID}/contacts/list` List merged contacts for a specific account with cursor-based pagination. ### Parameters - `accountID: string` Account ID this resource belongs to. - `query: ContactListParams` - `cursor?: string` Opaque pagination cursor; do not inspect. Use together with 'direction'. - `direction?: "after" | "before"` Pagination direction used with 'cursor': 'before' fetches older results, 'after' fetches newer results. Defaults to 'before' when only 'cursor' is provided. - `"after"` - `"before"` - `limit?: number` Maximum contacts to return per page. - `query?: string` Optional search query for blended contact lookup. ### Returns - `User` User the account belongs to. - `id: string` Stable Beeper user ID. Use as the primary key when referencing a person. - `cannotMessage?: boolean` 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?: string` Email address if known. Not guaranteed verified. - `fullName?: string` Display name as shown in clients (e.g., 'Alice Example'). May include emojis. - `imgURL?: string` Avatar image URL if available. May be temporary or local-only to this device; download promptly if durable access is needed. - `isSelf?: boolean` True if this user represents the authenticated account's own identity. - `phoneNumber?: string` User's phone number in E.164 format (e.g., '+14155552671'). Omit if unknown. - `username?: string` Human-readable handle if available (e.g., '@alice'). May be network-specific and not globally unique. ### Example ```typescript import BeeperDesktop from '@beeper/desktop-api'; const client = new BeeperDesktop(); // Automatically fetches more pages as needed. for await (const user of client.accounts.contacts.list('accountID')) { console.log(user.id); } ```