Skip to content

Reset Password

Reset user password using the reset token from email.

Interface Information

  • Endpoint: POST /api/auth/reset-password
  • Authentication: Not required (uses reset token)
  • Content-Type: application/json

Request Parameters

ParameterTypeRequiredDescription
tokenstringYesReset token from email
passwordstringYesNew password (minimum 6 characters)

Request Example

bash
curl -X POST http://localhost:3000/api/auth/reset-password \
  -H "Content-Type: application/json" \
  -d '{
    "token": "your-reset-token",
    "password": "newPassword123"
  }'

Response Example

json
{
  "success": true,
  "message": "Password reset successful"
}

Error Responses

HTTP Status CodeDescription
400Token invalid or expired
400Password length insufficient
500Server error

Security Notes

  • Reset token valid for 1 hour
  • Password must be at least 6 characters
  • Token becomes invalid immediately after successful reset