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.