Endpoint
POST /api/users/reset-password
Request Body
The email address associated with the account.
The 6-digit reset code received from the forgot-password endpoint.
The new password for the account. Must be at least 6 characters long.
Response
Success response (200 OK)Confirmation message: “Contraseña actualizada exitosamente”
The unique ID of the user whose password was reset
The username of the user whose password was reset
Example Request
Example Response
Error Responses
400 Bad Request - Password Too Short
401 Unauthorized - Invalid Reset Code
- The email and reset code combination does not exist
- The reset code does not match the one stored for the email
401 Unauthorized - Expired Reset Code
500 Internal Server Error
Notes
- After successful password reset, the reset code and expiry are cleared from the database
- The reset code can only be used once
- Password must be at least 6 characters long
