> ## Documentation Index
> Fetch the complete documentation index at: https://docs.learnway.xyz/llms.txt
> Use this file to discover all available pages before exploring further.

# User Profile

> Fetch user profiles, update personal details, change avatars, and track learning stats.

# User Profile

Endpoints for managing the user profile, avatars, settings, and learning statistics.

***

## Get Current User Profile

### Endpoint

```http theme={null}
GET /api/v2/user/profile
```

### Headers

```http theme={null}
Authorization: Bearer <jwt_access_token>
```

### Response (200 OK)

```json theme={null}
{
  "success": true,
  "data": {
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "email": "learner@learnway.xyz",
    "username": "cryptosage",
    "role": "USER",
    "country": "US",
    "isEmailVerified": true,
    "is2FAEnabled": false,
    "walletAddress": "0x71C...3921",
    "totalXP": 3450,
    "totalGems": 280,
    "currentStreak": 7,
    "longestStreak": 14,
    "profileImageUrl": "https://ik.imagekit.io/learnway/avatars/user1.png",
    "createdAt": "2026-06-01T12:00:00.000Z"
  }
}
```

***

## Update Profile

Update profile information with optional multipart/form-data for avatar image upload.

### Endpoint

```http theme={null}
PATCH /api/v2/user/profile
```

### Request Body

```json theme={null}
{
  "username": "sage_developer",
  "country": "CA",
  "bio": "Building on Lisk L2 and learning Solidity."
}
```

### Response (200 OK)

```json theme={null}
{
  "success": true,
  "data": {
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "username": "sage_developer",
    "country": "CA"
  },
  "message": "Profile updated successfully"
}
```
