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

# updateCustomerDob

> Update the date of birth for the logged-in customer.

Update the customer's date of birth. Returns `true` on success, `false` on failure.

## Usage

```javascript theme={null}
MageSDK.updateCustomerDob('1990-05-15').then(function(success) {
  if (success) {
    alert('Birthday updated!');
  }
});
```

## Parameters

<ParamField body="dateOfBirth" type="string" required>
  The date of birth in `YYYY-MM-DD` format.
</ParamField>

## Response

Returns a `boolean` — `true` if the update was successful, `false` otherwise.

## Example: Birthday form

```html theme={null}
<form id="update-dob-form">
  <div>
    <label>Date of Birth</label>
    <input type="date" name="dob" id="dob">
  </div>
  <input type="submit" value="Update Date of Birth" />
</form>

<script>
  document.addEventListener('DOMContentLoaded', function() {
    var form = document.getElementById('update-dob-form');
    form.addEventListener('submit', function(event) {
      event.preventDefault();
      var dob = document.getElementById('dob').value;
      if (dob) {
        MageSDK.updateCustomerDob(dob).then(function(success) {
          if (success) {
            alert("Updated the customer's birthday");
          }
        });
      }
    });
  });
</script>
```
