# Accounts ## List `$client->accounts->list(): AccountListResponse` **get** `/v1/accounts` Lists chat accounts across networks (WhatsApp, Telegram, Twitter/X, etc.) actively connected to this Beeper Desktop instance ### Returns - `list` - `string accountID` Chat account added to Beeper. Use this to route account-scoped actions. - `User user` User the account belongs to. ### Example ```php accounts->list(); var_dump($accounts); ``` ## Domain Types ### Account - `Account` - `string accountID` Chat account added to Beeper. Use this to route account-scoped actions. - `User user` User the account belongs to. # Contacts ## Search `$client->accounts->contacts->search(string accountID, string query): 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: string` Text to search users by. Network-specific behavior. ### Returns - `ContactSearchResponse` - `list items` ### Example ```php accounts->contacts->search('accountID', query: 'x'); var_dump($response); ``` ## List `$client->accounts->contacts->list(string accountID, ?string cursor, ?Direction direction, ?int limit, ?string query): 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. - `cursor?:optional string` Opaque pagination cursor; do not inspect. Use together with 'direction'. - `direction?:optional Direction` Pagination direction used with 'cursor': 'before' fetches older results, 'after' fetches newer results. Defaults to 'before' when only 'cursor' is provided. - `limit?:optional int` Maximum contacts to return per page. - `query?:optional string` Optional search query for blended contact lookup. ### Returns - `User` - `string id` Stable Beeper user ID. Use as the primary key when referencing a person. - `?bool cannotMessage` True if Beeper cannot initiate messages to this user (e.g., blocked, network restriction, or no DM path). The user may still message you. - `?string email` Email address if known. Not guaranteed verified. - `?string fullName` Display name as shown in clients (e.g., 'Alice Example'). May include emojis. - `?string imgURL` Avatar image URL if available. May be temporary or local-only to this device; download promptly if durable access is needed. - `?bool isSelf` True if this user represents the authenticated account's own identity. - `?string phoneNumber` User's phone number in E.164 format (e.g., '+14155552671'). Omit if unknown. - `?string username` Human-readable handle if available (e.g., '@alice'). May be network-specific and not globally unique. ### Example ```php accounts->contacts->list( 'accountID', cursor: '1725489123456|c29tZUltc2dQYWdl', direction: 'before', limit: 1, query: 'x', ); var_dump($page); ```