User directory
Searches the user directory.
Performs a search for users. The homeserver may determine which subset of users are searched. However, the homeserver MUST at a minimum consider users who are visible to the requester based on their membership in rooms known to the homeserver. This means:
- users that share a room with the requesting user
- users who are joined to rooms known to the homeserver that have a public join rule
- users who are joined to rooms known to the homeserver that have a world_readable history visibility
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.
post/_matrix/client/v3/user_directory/search
Request
- Base URLhttps://matrix.org
- Auth
- API key in query parameter access_token
- or HTTP bearer
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Request body
Example request
{
"limit": 10,
"search_term": "foo"
}Response
The results of the search.
Example response
{
"results": [
{
"avatar_url": "mxc://bar.com/foo",
"display_name": "Foo",
"user_id": "@foo:bar.com"
}
]
}Changes
No recorded changes to this operation across all 1 revision of this API.