Nest Authbeta

POST /auth/reset-password

Reset password

Reset password

POST/auth/reset-password

Request body

NestAuthResetPasswordWithTokenRequestDto

FieldTypeRequiredDescription
tokenstringrequiredPassword reset token (JWT) received after OTP verification
Example: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ0eXBlIjoicGFzc3dvcmQtcmVzZXQifQ.xyz
newPasswordstringrequiredNew password
Example: NewSecurePass123!

Examples

Example
{
  "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ0eXBlIjoicGFzc3dvcmQtcmVzZXQifQ.xyz",
  "newPassword": "NewSecurePass123!"
}

Responses

200

NestAuthPasswordResetResponseDto

FieldTypeRequiredDescription
messagestringrequiredResponse message
Example: Password has been reset successfully

Example response

{
  "message": "Password has been reset successfully"
}

Try it

curl -X POST 'https://api.example.com/auth/reset-password' \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
  -d '{"token":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ0eXBlIjoicGFzc3dvcmQtcmVzZXQifQ.xyz","newPassword":"NewSecurePass123!"}'

On this page