Complete the password reset process by setting a new password. This is the final step in the password reset flow and requires a valid confirmed token.
POST
/api/v1/auth/reset-password
curl \
--request POST 'http://localhost:3500/api/v1/auth/reset-password' \
--header "Content-Type: application/json" \
--data '{"email":"user@university.edu","password":"newSecurePassword123"}'
Request example
Set new password after token confirmation
{
"email": "user@university.edu",
"password": "newSecurePassword123"
}
Response examples (200)
{
"message": "Password reset successfully",
"success": true
}
Response examples (400)
{
"error": "Bad Request",
"message": [
"password should not be empty",
"email must be an email"
],
"statusCode": 400
}
Response examples (401)
{
"error": "Unauthorized",
"message": "Reset token must be confirmed first",
"statusCode": 401
}
Response examples (404)
{
"error": "Not Found",
"message": "User not found",
"statusCode": 404
}