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

# Update a customer

> Update an existing customer within Layer.

The `PUT` endpoint updates an existing customer.

### Path Parameters

<ParamField path="business_id" required="true" type="string">
  ID of the [Business](/api-reference/business/business) the customer is associated with.
</ParamField>

<ParamField path="customer_id" required="true" type="string">
  ID of the [Customer](/api-reference/invoice/customer) to be updated.
</ParamField>

### Body

<ParamField body="external_id" type="string">
  External ID for the customer within your platform. **Idempotency key.**
</ParamField>

<ParamField body="individual_name" type="string">
  Name of the individual customer.
</ParamField>

<ParamField body="company_name" type="string">
  Name of the company customer.
</ParamField>

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

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

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

<ParamField body="address_string" type="string">
  Full address of the customer.
</ParamField>

<ParamField body="notes" type="string">
  Notes about the customer.
</ParamField>

<ResponseField name="tags" type="Array of Tags">
  <Expandable title="New tag properties">
    <ResponseField name="key" required="true" type="string">
      The new tag's key
    </ResponseField>

    <ResponseField name="value" required="true" type="string">
      The new tag's value
    </ResponseField>
  </Expandable>
</ResponseField>

### Response

Returns the updated [Customer object](/api-reference/invoice/customer)

<RequestExample>
  ```bash Request theme={null}
  curl -X PUT https://sandbox.layerfi.com/v1/businesses/${business_id}/customers/${customer_id} \
    -H "Authorization: Bearer <access_token>" \
    -H "Content-Type: application/json" \
      -d '{
            "external_id": "customer-1",
            "individual_name": "John Doe",
            "company_name": "Acme, Inc.",
            "email": "john@hotmail.com",
            "mobile_phone": "555-555-5555",
            "office_phone": "555-555-5555",
            "address_string": "123 Main St, Phoenix, AZ 85001",
            "notes": "This is a note"
          }'
  ```
</RequestExample>

<ResponseExample>
  ```json Response theme={null}
  {
   "data": {
     "type": "CustomerData",
     "id": "4f7c1b16-e057-4ec0-8b20-50308ba5b9ea",
     "external_id": "customer-1",
     "individual_name": "John Doe",
     "company_name": "Acme, Inc.",
     "email": "john@hotmail.com",
     "mobile_phone": "555-555-5555",
     "office_phone": "555-555-5555",
     "address_string": "123 Main St, Phoenix, AZ 85001",
     "notes": "This is a note",
     "status": "ACTIVE",
     "transaction_tags": []
   }
  }
  ```
</ResponseExample>
