Authentication Endpoints
POST /api/check_user.php
Check if a user exists in the database by email address.
POST /api/register_user.php
Register a new user with email only. All other profile information is optional and can be added later.
POST /api/send_auth_code.php
Send a 2-digit authentication code to the user's email via SMTP2GO. Code expires in 10 minutes.
POST /api/verify_auth_code.php
Verify the authentication code entered by the user. Returns a session token on success.
Profile Management Endpoints
GET/POST /api/get_user_profile.php
Retrieve complete user profile information including pregnancy status and calculated pregnancy weeks.
POST /api/update_profile.php โญ
Comprehensive profile update endpoint - Update ALL user fields (display_name, date_of_birth, phone_e164, due_date, months_before_due_at_intake, number_of_kids, is_pregnant). Requires authentication. Perfect for multi-page forms.
POST /api/update_pregnancy_info.php
Update pregnancy-specific fields only (is_pregnant, due_date, months_before_due_at_intake, number_of_kids). Alternative to update_profile.php for pregnancy-only updates.
POST /api/unlock_account.php
Unlock a user account that was automatically locked after 5 failed verification attempts. Admin/support use only.