User
User profile and settings
Retrieve authenticated user's profile information
Authorizations
AuthorizationstringRequired
JWT token obtained from login or register endpoint
Responses
200
Profile retrieved successfully
application/json
401
Unauthorized
application/json
get
/user/profileGET /api/v3/user/profile HTTP/1.1
Host: localhost:8009
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"success": true,
"code": 200,
"message": "Profile retrieved successfully",
"data": {
"profile": {
"id": 1,
"username": "johndoe",
"email": "[email protected]",
"balance": 100.5,
"referral_balance": 25,
"referral_code": "CM12345678",
"role": "user"
}
}
}Update user profile information
Authorizations
AuthorizationstringRequired
JWT token obtained from login or register endpoint
Body
emailstring · emailOptionalExample:
[email protected]telegram_usernamestringOptionalExample:
@johndoeResponses
200
Profile updated successfully
application/json
put
/user/profilePUT /api/v3/user/profile HTTP/1.1
Host: localhost:8009
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 63
{
"email": "[email protected]",
"telegram_username": "@johndoe"
}200
Profile updated successfully
{
"success": true,
"code": 200,
"message": "Profile updated successfully"
}Retrieve user's current balance
Authorizations
AuthorizationstringRequired
JWT token obtained from login or register endpoint
Responses
200
Balance retrieved successfully
application/json
get
/user/balanceGET /api/v3/user/balance HTTP/1.1
Host: localhost:8009
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
200
Balance retrieved successfully
{
"success": true,
"code": 200,
"message": "Balance retrieved successfully",
"data": {
"balance": 100.5,
"referral_balance": 25,
"total_balance": 125.5,
"currency": "BDT",
"currency_symbol": "৳"
}
}Retrieve user's activity statistics
Authorizations
AuthorizationstringRequired
JWT token obtained from login or register endpoint
Responses
200
Statistics retrieved successfully
application/json
get
/user/statisticsGET /api/v3/user/statistics HTTP/1.1
Host: localhost:8009
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
200
Statistics retrieved successfully
{
"success": true,
"code": 200,
"message": "text",
"data": {
"statistics": {
"orders": {
"total_count": 1,
"total_amount": 1
},
"deposits": {
"total_count": 1,
"total_amount": 1
},
"referrals": {
"total_count": 1,
"completed_count": 1,
"total_earned": 1
},
"tickets": {
"active_count": 1
}
}
}
}Last updated