# Update Member
> Source: /api-reference/members/me/update-me
> Update member display information
> Endpoint: PATCH /members/me

## Overview [#overview]

Updates core member information including names, display name, avatar, and onboarding status.

This endpoint is for updating member-level data. To update profile preferences (travel, dining, etc.), use the [Update Profile](/api-reference/members/me/profile/update-profile) endpoint.

## Authentication [#authentication]

Requires a valid Clerk JWT token in the Authorization header.

## Request Body [#request-body]

All fields are optional. Only include fields you want to update.

<ParamField body="firstName" type="string">
  Member's first name
</ParamField>

<ParamField body="lastName" type="string">
  Member's last name
</ParamField>

<ParamField body="displayName" type="string">
  Custom display name (if not set, computed from first/last name or email)
</ParamField>

<ParamField body="avatarUrl" type="string">
  Avatar image URL
</ParamField>

<ParamField body="onboardingCompleted" type="boolean">
  Mark onboarding as completed (sets onboardingCompletedAt timestamp)
</ParamField>

<ParamField body="dateOfBirth" type="string">
  Date of birth in YYYY-MM-DD format
  
  Note: This updates the profile dateOfBirth field
</ParamField>

<RequestExample>

```bash cURL
curl -X PATCH "http://localhost:3000/v1/members/me" \
  -H "Authorization: Bearer YOUR_CLERK_JWT" \
  -H "Content-Type: application/json" \
  -d '{
    "firstName": "John",
    "lastName": "Doe",
    "displayName": "John D.",
    "onboardingCompleted": true
  }'
```

```typescript TypeScript
const response = await fetch('http://localhost:3000/v1/members/me', {
  method: 'PATCH',
  headers: {
    'Authorization': 'Bearer YOUR_CLERK_JWT',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    firstName: "John",
    lastName: "Doe",
    displayName: "John D.",
    onboardingCompleted: true
  })
});

const updatedMember = await response.json();
```

```javascript Bruno
// From: /bruno/Members (Surface)/Me/Profile/Update Me.bru
PATCH {{host}}/members/me
Authorization: Bearer {{clerkJwt}}
Content-Type: application/json

{
  "firstName": "John",
  "lastName": "Doe",
  "displayName": "John D."
}
```

</RequestExample>

## Response [#response]

Returns the complete updated member data, same as [GET /members/me](/api-reference/members/me/get-me).

<ResponseExample>

```json 200 Response - Success
{
  "member": {
    "externalId": "user_2abc123def456",
    "memberCode": "JRN123456",
    "legacyJourneyUserId": null,
    "displayName": "John D.",
    "firstName": "John",
    "lastName": "Doe",
    "avatarUrl": "https://example.com/avatar.jpg",
    "status": "active",
    "enrolledAt": "2023-01-15T10:30:00Z",
    "memberSince": "January 2023",
    "onboardingCompletedAt": "2024-04-20T12:00:00Z",
    "createdAt": "2023-01-15T10:30:00Z",
    "updatedAt": "2024-04-20T12:00:00Z"
  },
  "profile": {
    "dateOfBirth": "1990-01-15",
    "gender": "male",
    "nationality": "United States",
    "timezone": "America/Los_Angeles",
    "language": "en",
    "bio": "Frequent traveler and points enthusiast",
    "socialLinks": {
      "linkedin": "https://linkedin.com/in/johndoe",
      "instagram": "@johndoe"
    },
    "travelPreferences": {
      "preferredAirlines": ["United", "Delta"],
      "frequentFlyerPrograms": [
        {
          "airline": "United",
          "number": "UA123456789"
        }
      ],
      "seatPreference": "aisle",
      "mealPreference": "vegetarian",
      "travelClass": "business",
      "travelCompanions": ["Jane Doe"],
      "passportCountry": "US"
    }
  },
  "contacts": [
    {
      "type": "email",
      "value": "john.doe@example.com",
      "isPrimary": true,
      "verifiedAt": "2023-01-15T10:30:00Z"
    },
    {
      "type": "phone",
      "value": "+15551234567",
      "isPrimary": true,
      "verifiedAt": "2023-01-15T10:35:00Z"
    }
  ],
  "wallet": {
    "spendablePoints": 25000,
    "validBalance": 23000,
    "creditBalance": 2000,
    "tierEligiblePoints": 15000
  },
  "loyalty": {
    "tierLevel": 2,
    "tierName": "Explorer",
    "lifetimePoints": 75000,
    "pointsToNextTier": 25000,
    "nextTierName": "Voyager",
    "earnYear": 2023,
    "currentYear": 2024,
    "currentYearPoints": 15000,
    "statusValidThrough": "December 31, 2025",
    "pointsToMaintainTier": 5000,
    "tiers": [
      {
        "tierLevel": 1,
        "tierName": "Traveler",
        "minPoints": 0
      },
      {
        "tierLevel": 2,
        "tierName": "Explorer",
        "minPoints": 20000
      },
      {
        "tierLevel": 3,
        "tierName": "Voyager",
        "minPoints": 50000
      },
      {
        "tierLevel": 4,
        "tierName": "Pioneer",
        "minPoints": 100000
      }
    ]
  }
}
```

```json 400 Response - Validation Error
{
  "statusCode": 400,
  "message": [
    "dateOfBirth must be a valid ISO 8601 date string"
  ],
  "error": "Bad Request"
}
```

</ResponseExample>

## Notes [#notes]

- The `onboardingCompleted` flag can only be set to `true`, not back to `false`
- Setting `onboardingCompleted` to `true` sets the `onboardingCompletedAt` timestamp if not already set
- The `displayName` is shown in the UI; if not set, it's computed from first/last name or email
- The `dateOfBirth` field updates the profile's date of birth

## Related Endpoints [#related-endpoints]

- [Get Member](/api-reference/members/me/get-me) - Get complete member data
- [Update Profile](/api-reference/members/me/profile/update-profile) - Update extended profile preferences
