POST /auth/reset-password
Reset password
Reset password
/auth/reset-passwordRequest body
NestAuthResetPasswordWithTokenRequestDto
| Field | Type | Required | Description |
|---|---|---|---|
token | string | required | Password reset token (JWT) received after OTP verification Example: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ0eXBlIjoicGFzc3dvcmQtcmVzZXQifQ.xyz |
newPassword | string | required | New password Example: NewSecurePass123! |
Examples
Example
{
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ0eXBlIjoicGFzc3dvcmQtcmVzZXQifQ.xyz",
"newPassword": "NewSecurePass123!"
}Responses
200
NestAuthPasswordResetResponseDto
| Field | Type | Required | Description |
|---|---|---|---|
message | string | required | Response 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!"}'