POST /api/v1/auth/reset-password

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.

application/json

Body Required

New login credentials for password reset

  • email string Required
  • password string Required

Responses

  • 200 application/json

    Password reset completed successfully

    Hide response attributes Show response attributes object
    • message string Required

      Response message

    • success boolean Required
  • 400 application/json

    Invalid password format or validation errors

  • 401 application/json

    Reset token not confirmed or expired

  • 404 application/json

    User with provided email not found

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
}