User

User profile and settings

Get user profile

get
/user/profile

Retrieve authenticated user's profile information

Authorizations
AuthorizationstringRequired

JWT token obtained from login or register endpoint

Responses
200

Profile retrieved successfully

application/json
get
/user/profile
GET /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

put
/user/profile

Update user profile information

Authorizations
AuthorizationstringRequired

JWT token obtained from login or register endpoint

Body
emailstring · emailOptionalExample: [email protected]
telegram_usernamestringOptionalExample: @johndoe
Responses
200

Profile updated successfully

application/json
put
/user/profile
PUT /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"
}

Get user balance

get
/user/balance

Retrieve user's current balance

Authorizations
AuthorizationstringRequired

JWT token obtained from login or register endpoint

Responses
200

Balance retrieved successfully

application/json
get
/user/balance
GET /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": "৳"
  }
}

Get user statistics

get
/user/statistics

Retrieve user's activity statistics

Authorizations
AuthorizationstringRequired

JWT token obtained from login or register endpoint

Responses
200

Statistics retrieved successfully

application/json
get
/user/statistics
GET /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