Endpoint
POST /api/users/forgot-password
Request Body
The email address associated with the account that needs password recovery.
Response
Success response (200 OK)Confirmation message: “Reset code sent to email”
A 6-digit reset code valid for 30 minutes. In production, this would be sent via email rather than returned in the response.
Example Request
Example Response
Error Responses
404 Not Found - Email Not Registered
500 Internal Server Error
Notes
- The reset code expires after 30 minutes
- The reset code is a 6-digit numeric string
- In a production environment, the reset code should be sent via email and not returned in the API response
