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 page of the members the Users widget lists, excluding the current user, following the widget's settings: display mode (all members, by role or hand-picked), sort order and search. The route also answers GET with the same parameters.
๐๏ธ 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.