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
| Parameter | Type | Required | Description |
|---|---|---|---|
| token | string | Yes | Reset token from email |
| password | string | Yes | New 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 Code | Description |
|---|---|
| 400 | Token invalid or expired |
| 400 | Password length insufficient |
| 500 | Server error |
Security Notes
- Reset token valid for 1 hour
- Password must be at least 6 characters
- Token becomes invalid immediately after successful reset