curl -sS -X PUT 'https://matrix.example.com/_synapse/admin/v2/users/@alice:example.com' -H "Authorization: Bearer $ACCESS_TOKEN" -d '{"displayname":"Alice Marigold"}'

Category: Matrix & Synapse

curl -sS -X PUT 'https://matrix.example.com/_synapse/admin/v2/users/@alice:example.com' -H "Authorization: Bearer $ACCESS_TOKEN" -d '{"displayname":"Alice Marigold"}'

Update a user's profile via the Admin API

The v2 users endpoint both creates and modifies accounts, so PUT with a displayname updates the profile of an existing user. An empty displayname string removes the name, and avatar_url accepts an mxc:// URI. Other editable fields include password, admin, deactivated, and threepids. This is the programmatic alternative to register_new_matrix_user for managing accounts.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.