# Users Password Update div strong 🔨 In Development — This section is still being developed and may change. **PUT** `/v1/auth/users/password/update` - Alternative endpoint for updating user passwords. This endpoint provides compatibility with different client implementations and follows the same validation and security rules as the main password update endpoint. Updates the password for the authenticated user via the alternative path. Requires verification of the current password and confirmation of the new password. Same validation and security rules apply as the main password update endpoint. #### Request Body **`current_password`** string required Current password for verification. Must match the user's existing password. **`new_password`** string required New password. Must meet complexity requirements: minimum 8 characters, uppercase and lowercase letters, at least one number, and at least one special character. **`confirm_password`** string required Confirmation of the new password. Must match `new_password` exactly. #### Headers **`Authorization`** string required Bearer token for authentication. Format: `Bearer ` ## Returns A Password Update Response object containing confirmation of successful password update. **`success`** boolean Indicates if the password was updated successfully. Always `true` for successful updates. **`message`** string Success message confirming the password update. Update Password ```bash curl -X PUT https://api.freddy.aitronos.com/v1/auth/users/password/update \ -H "Authorization: Bearer $FREDDY_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "current_password": "CurrentPassword123!", "new_password": "NewSecurePassword456!", "confirm_password": "NewSecurePassword456!" }' ``` ```python import requests response = requests.put( "https://api.freddy.aitronos.com/v1/auth/users/password/update", headers={ "Authorization": f"Bearer {access_token}", "Content-Type": "application/json" }, json={ "current_password": "CurrentPassword123!", "new_password": "NewSecurePassword456!", "confirm_password": "NewSecurePassword456!" } ) result = response.json() if result["success"]: print("Password updated successfully!") else: print(f"Password update failed: {result.get('detail', 'Unknown error')}") ``` ```javascript const response = await fetch('https://api.freddy.aitronos.com/v1/auth/users/password/update', { method: 'PUT', headers: { 'Authorization': `Bearer ${localStorage.getItem('accessToken')}`, 'Content-Type': 'application/json' }, body: JSON.stringify({ current_password: 'CurrentPassword123!', new_password: 'NewSecurePassword456!', confirm_password: 'NewSecurePassword456!' }) }); const result = await response.json(); if (result.success) { console.log('Password updated successfully!'); } else { console.error('Password update failed:', result.detail); } ``` Response examples ```json { "success": true, "message": "Password updated successfully" } ``` ```json { "detail": "Passwords do not match" } ``` ```json { "detail": "Current password is incorrect" } ``` ```json { "detail": "Authentication required" } ```