POST
/users/{username}/reset-passwordReset a user's password
Resets a user's password using a code received by email. Submit the code with the new password and identify the account with the username path parameter. Use the forgot-password operation to request the code before submitting the reset.
- IdempotentThe SDK sends
Idempotency-Key, so a retried request is only applied once.
usernamestringrequired
The username of the account whose password you are resetting.
Password reset details containing the email code and the new password.
codestringoptional
The password reset code received by email.
passwordstringoptional
The new password to set for the user.
200Returns an object containing a `message` and an `error` description, which may be empty.
errorstringoptional
error description if any
messagestringoptional
message, can be empty
400Returned when the request is invalid, including when the reset code or password is not accepted.
errorstringoptional
error description if any
messagestringoptional
message, can be empty
401Returned when authentication is missing or invalid.
errorstringoptional
error description if any
messagestringoptional
message, can be empty
403Returned when the authenticated user is not permitted to reset the specified user's password.
errorstringoptional
error description if any
messagestringoptional
message, can be empty
404Returned when the specified user is not found.
errorstringoptional
error description if any
messagestringoptional
message, can be empty
500Returned when an internal server error occurs.
errorstringoptional
error description if any
messagestringoptional
message, can be empty
defaultUnexpected Error
errorstringoptional
error description if any
messagestringoptional
message, can be empty
Error handling
A 400 is returned when the reset code or new password is invalid. A 401 indicates that authentication is missing or invalid, and a 403 indicates that the authenticated user is not permitted to reset this password. A 404 indicates that the user was not found, and a 500 indicates an internal server error; provide the code and password in the request body and use the username path parameter for the account.