How to reset the password of a portal user by using rest API.
This is example code.
@frappe.whitelist()
def update_user_password(user, pwd):
from frappe.utils.password import update_password
update_password(user, pwd)
Modify this code and call this API