Searches the user directory.

POST {{baseUrl}}/user_directory/search

Performs a search for users. The homeserver may determine which subset of users are searched, however the homeserver MUST at a minimum consider the users the requesting user shares a room with and those who reside in public rooms (known to the homeserver). The search MUST consider local users to the homeserver, and SHOULD query remote users as part of the search.

The search is performed case-insensitively on user IDs and display names preferably using a collation determined based upon the Accept-Language header provided in the request, if present.

Request Body

{"search_term"=>"foo", "limit"=>10}

HEADERS

KeyDatatypeRequiredDescription
Content-Typestring

RESPONSES

status: OK

{"results":[{"user_id":"@foo:bar.com","display_name":"Foo","avatar_url":"mxc://bar.com/foo"}],"limited":false}