Registration is performed by creating an Account resource. Refer to “Create an account” for details.
curl -d '{"email": "foo@example.com", "password": "thepassword", "displayname": "Foo Bar Baz"}' \
-H 'Content-Type: application/json' \
-X POST \
https://login.ubuntu.com/api/v2/accounts