Participants
Add, remove, promote, and search thread members
📄️ Add participant
Adds one or more users to a conversation. The current user must have invite permission for the thread (controlled by the `can_invite()` function and `allow_invite` thread setting). Users who are already participants are skipped. Returns an error if no valid additions can be made.
📄️ Remove participant
Removes a user from a conversation. The current user must be a super-moderator or thread moderator. Moderators cannot remove super-moderators unless the requester is also a super-moderator. The removed user loses access to the conversation and stops receiving notifications.
📄️ Make moderator
Promotes a thread participant to moderator status. For chat rooms, only WordPress administrators can promote moderators. For regular threads, the current user must be a super-moderator. The target user must already be a participant of the thread.
📄️ Remove moderator
Removes moderator status from a thread participant. For chat rooms, only WordPress administrators can demote moderators. For regular threads, the current user must be a super-moderator. The target user remains a regular participant after demotion.
📄️ Search participants
Searches for participants within a specific thread by display name or username. Returns matching user IDs excluding the current user and deleted recipients.
📄️ Get @mention suggestions
Returns thread participants matching a search query for the @mention autocomplete feature. Searches display_name and user_nicename fields. Excludes the current user and deleted recipients. Returns up to 50 unique user IDs.