Skip to main content

Reset Password

POST /auth/reset_password

Description

Resets the password for an account using the verification code sent by the forget-password flow.

Request Parameters

Requires Authentication: false

BODY

NameTypeRequiredDescription
emailstringYesAccount email.
passwordstringYesNew password.
verificationCodestringYesSix-digit reset code.

Usage Example

await axios.post("https://api.daykeeper.app/auth/reset_password", {
email: "johndoe@example.com",
password: "MyNewPassword1234",
verificationCode: "123456",
})

Success Response

{
"message": "Password updated successfully"
}

Notes

  • If the code is wrong, the stored reset code is cleared.
  • If the code is expired, the stored reset code is also cleared.

Error Response

CodeDescription
400Missing required fields
401Invalid verification code
403Expired reset code
500Server error

Example

{
"message": "Enter a valid Verification code"
}