curl --request POST \
--url https://api.example.com/api/reset-password \
--header 'Content-Type: application/json' \
--data '
{
"token": "<string>",
"new_password": "<string>"
}
'{
"message": "<string>"
}Reset a user’s password using a reset token
curl --request POST \
--url https://api.example.com/api/reset-password \
--header 'Content-Type: application/json' \
--data '
{
"token": "<string>",
"new_password": "<string>"
}
'{
"message": "<string>"
}curl -X POST http://localhost:8000/api/reset-password \
-H "Content-Type: application/json" \
-d '{
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
"new_password": "newsecurepassword456"
}'
{
"message": "Password has been reset successfully"
}
Show 400 - Invalid token
{
"detail": "Invalid token"
}
Show 400 - Expired token
{
"detail": "Reset token has expired"
}
Show 404 - User not found
{
"detail": "User not found"
}