Skip to main content

POST /utils/reset-password/

Reset password

Updates a user's password in the system using a valid password reset token.

Endpoint

POST /utils/reset-password/

Parameters

NameTypeDescription
sessionSessionDepThe database session dependency used for user lookup and persistence.
bodyNewPasswordThe request body containing the reset token and the new password to be set.

Request Body

FieldTypeDescription
tokenstringThe verification token received via email to authorize the password reset.
new_passwordstringThe new password string to be applied to the user account.

Response

StatusDescription
200Password successfully updated. Returns Message.
400Returned if the token is invalid, the user does not exist, or the user account is inactive. Returns HTTPException.