🔐 Authentication & Registration

User Registration, Login, and Profile Management

POST /api/auth/register

📋 Request Body Parameters:

wallet_address string Required 0x address (EVM) or T... (Tron)
chain string Optional evm (default) or tron / trc20
password string Required User password
first_name string Optional First name
last_name string Optional Last name
phone string Optional Phone number
referral_id string Optional Referral ID of the person who referred you

User Registration (Web3 Wallet)

POST /api/auth/login

📋 Request Body Parameters:

wallet_address string Required 0x address (EVM) or T... (Tron)
chain string Optional evm (default) or tron / trc20
password string Required User password
referral_id string Optional (Query Parameter) Referral ID for auto-registration

User Login (Web3 Wallet)

GET /api/auth/profile PUT /api/auth/profile

🔐 Authentication Required (Bearer Token)

GET: No parameters - Returns current user profile
PUT Request Body (all optional):
username string Optional New username
email string Optional New email
first_name string Optional First name
last_name string Optional Last name
phone string Optional Phone number

User Profile

POST /api/auth/verify-referral

📋 Request Body Parameters:

referral_id string Required Referral ID to verify

Verify Referral ID

POST /api/auth/profile/change-password POST /api/auth/forgot-password POST /api/auth/reset-password

Password Management

Change Password

POST /api/auth/profile/verify-email POST /api/auth/verify-email

Email Verification

Verify Email (Profile)

POST /api/auth/profile/avatar

📋 Request:

file File (multipart/form-data) Required Image file (max 10MB)

Upload Avatar

POST /api/auth/refresh

📋 Request Body Parameters:

refreshToken string Required Refresh token

Refresh Access Token