Password reset is initiated by creating a Password reset token resource. The user will receive an email containing a token, which is to be provided alongside with the new password to complete the reset procedure.
Refer to “Create a password reset token” for details.
curl -d '{"email": "foo@example.com"}' \
-H 'Content-Type: application/json' \
-X POST \
https://login.ubuntu.com/api/v2/tokens/password