Users & Search
User suggestions, friends, groups, and search across users and messages
📄️ Search
Comprehensive search across users, friends, and message content. User search can be disabled via the `disableUsersSearch` plugin setting. Results are separated into friend matches and non-friend matches. Message search returns thread IDs with match counts (limited to 10 results). The response includes full thread and user data for rendering search results.
📄️ Get user suggestions
Returns suggested users for starting new conversations. Prioritizes friends (up to 12), then falls back to other users. Respects friends-only and followers-only messaging modes. Can be overridden via the `better_messages_predefined_suggestions_user_ids` filter. Administrators bypass friends-only restrictions.
📄️ Get conversation suggestions
Returns user suggestions for the new conversation screen with optional search filtering. When a threadId is provided, excludes users already participating in that thread. Respects the `disableUsersSearch` setting. Returns up to 50 user profiles (configurable via filter). AI bots are hidden from suggestions in E2E encrypted thread contexts.
📄️ Get users list
Returns a paginated list of active WordPress users, excluding the current user. Users are ordered by last activity (most recent first). Returns up to 40 users per request. Each user is marked with isContact flag.
📄️ Get friends list
Returns the current user's friends list. This endpoint is entirely filter-driven — the default returns an empty array. BuddyPress, BuddyBoss, and other social plugins hook into the `better_messages_get_friends` filter to provide actual friend data.
📄️ Get groups
Returns groups the current user belongs to. Like getFriends, this endpoint is filter-driven — the default returns an empty array. BuddyPress, PeepSo, and other group plugins hook into the `better_messages_get_groups` filter to provide group data.