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

# Update a customer

> Updates the information of a customer by defining the values for the passed parameters. Any parameters not supplied will remain unaltered.

## Path parameters

<ParamField path="id" type="string">
  The ID of the customer.
</ParamField>

## Body parameters

<ParamField body="name" type="string">
  The name of the customer.
</ParamField>

<ParamField body="email" type="string">
  The email of the customer.
</ParamField>

<ParamField body="phone" type="string">
  The phone number of the customer.
</ParamField>

<ParamField body="address" type="object">
  The address of the customer

  <Expandable title="address">
    <ParamField body="country" type="string">
      Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2 "ISO 3166-1 alpha-2")), eg: "dz".
    </ParamField>

    <ParamField body="state" type="string">
      The state of the customer.
    </ParamField>

    <ParamField body="address" type="string">
      The address line of the customer.
    </ParamField>
  </Expandable>
</ParamField>

<ParamField body="metadata" type="key-value array">
  A Set of key-value pairs that can be used to store additional information
  about the customer.
</ParamField>

## Returns

If the request is successful, it returns a customer object with the updated information.

<ResponseExample>
  ```json Response theme={null}
  {
    "id": "01hj0p5s3ygy2mx1czg2wzcc4x",
    "entity": "customer",
    "livemode": false,
    "name": "Hocine Saad",
    "email": null,
    "phone": null,
    "address": {
      "country": "Algeria",
      "state": "Tizi-Ouzou",
      "address": "123 Main Street"
    },
    "metadata": null,
    "created_at": 1702977791,
    "updated_at": 1702977791
  }
  ```
</ResponseExample>
