curl -sS -X POST 'https://matrix.example.com/_synapse/admin/v1/register' -d '{"nonce":"thisisanonce","username":"alice","password":"secret","admin":false,"mac":"9f86d081884c7d659a2feaa0c55ad015a3bf4f1b"}'

Category: Matrix & Synapse

curl -sS -X POST 'https://matrix.example.com/_synapse/admin/v1/register' -d '{"nonce":"thisisanonce","username":"alice","password":"secret","admin":false,"mac":"9f86d081884c7d659a2feaa0c55ad015a3bf4f1b"}'

Register a user via shared-secret API

Creates the account when you include the nonce from the GET call and a mac field: the HMAC-SHA1 of nonce, username, password, and admin or notadmin, keyed by the registration shared secret. The hex digest comes from the openssl one-liner shown in the docs. Returns an access token and device ID for the new user. register_new_matrix_user automates all of this.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.