-
Andrew Morgan authoredAndrew Morgan authored
Create or modify Account
This API allows an administrator to create or modify a user account with a
specific user_id
. Be aware that user_id
is fully qualified: for example,
@user:server.com
.
This api is:
PUT /_synapse/admin/v2/users/<user_id>
with a body of:
{
"password": "user_password",
"displayname": "User",
"threepids": [
{
"medium": "email",
"address": "<user_mail_1>"
},
{
"medium": "email",
"address": "<user_mail_2>"
}
],
"avatar_url": "<avatar_url>",
"admin": false,
"deactivated": false
}
including an access_token
of a server admin.
The parameter displayname
is optional and defaults to the value of
user_id
.
The parameter threepids
is optional and allows setting the third-party IDs
(email, msisdn) belonging to a user.
The parameter avatar_url
is optional. Must be a [MXC
URI](https://matrix.org/docs/spec/client_server/r0.6.0#matrix-content-mxc-uris).
The parameter admin
is optional and defaults to false
.
The parameter deactivated
is optional and defaults to false
.
The parameter password
is optional. If provided, the user's password is
updated and all devices are logged out.
If the user already exists then optional parameters default to the current value.
List Accounts
This API returns all local user accounts.
The api is:
GET /_synapse/admin/v2/users?from=0&limit=10&guests=false