---
title: "Update a customer"
description: "Update details of a specific customer. The path `customer_id` parameter is cosmetic — the service reads `customer_id` from the request body (marked required there). Only provided fields are updated."
protocol: rest
method: PUT
endpoint: "/v1/customers/{customer_id}"
baseUrl: "https://api.gravv.xyz"
group: "Customers"
auth:
  label: "Api-Key"
  name: "Api-Key"
  in: header
---

# Update a customer

<Endpoint method="PUT" path="/v1/customers/{customer_id}" />

Update details of a specific customer. The path `customer_id` parameter is cosmetic — the service reads `customer_id` from the request body (marked required there). Only provided fields are updated.

## Path Parameters

<ParamField name="customer_id" path="customer_id" type="string" required>
  Cosmetic path parameter — the service resolves the customer from `customer_id` in the request body, not this value.
</ParamField>

## Request Body

<ParamField name="customer_id" body="customer_id" type="string" required>
  UUID of the customer to update. Required in the request body — the path `customer_id` parameter is cosmetic only.
</ParamField>

<ParamField name="first_name" body="first_name" type="string">
</ParamField>

<ParamField name="middle_name" body="middle_name" type="string">
</ParamField>

<ParamField name="last_name" body="last_name" type="string">
</ParamField>

<ParamField name="email" body="email" type="string">
</ParamField>

<ParamField name="phone" body="phone" type="string">
</ParamField>

<ParamField name="date_of_birth" body="date_of_birth" type="string">
</ParamField>

<ParamField name="gender" body="gender" type="string">

  Possible values: `male`, `female`, `other`
</ParamField>

<ParamField name="address" body="address" type="object">

  <Expandable title="properties">
    <ParamField name="address_line1" body="address.address_line1" type="string" required>
    </ParamField>

    <ParamField name="address_line2" body="address.address_line2" type="string">
    </ParamField>

    <ParamField name="city" body="address.city" type="string" required>
    </ParamField>

    <ParamField name="postal_code" body="address.postal_code" type="string" required>
    </ParamField>

    <ParamField name="state" body="address.state" type="string" required>
    </ParamField>

    <ParamField name="country" body="address.country" type="string" required>
    </ParamField>

  </Expandable>
</ParamField>

<ParamField name="business_name" body="business_name" type="string">
</ParamField>

<ParamField name="business_description" body="business_description" type="string">
</ParamField>

<ParamField name="business_type" body="business_type" type="string">
</ParamField>

<ParamField name="business_industry" body="business_industry" type="string">
</ParamField>

<ParamField name="registration_number" body="registration_number" type="string">
</ParamField>

<ParamField name="external_id" body="external_id" type="string">
</ParamField>

<ParamField name="associated_persons" body="associated_persons" type="object[]">
  List of associated persons to update or add. If `id` is provided the existing record is updated; if omitted a new person is created (all required fields must then be present).

  <Expandable title="properties">
    <ParamField name="id" body="associated_persons.id" type="string">
      UUID of an existing associated person. Omit to add a new person.
    </ParamField>

    <ParamField name="first_name" body="associated_persons.first_name" type="string">
    </ParamField>

    <ParamField name="middle_name" body="associated_persons.middle_name" type="string">
    </ParamField>

    <ParamField name="last_name" body="associated_persons.last_name" type="string">
    </ParamField>

    <ParamField name="email" body="associated_persons.email" type="string">
    </ParamField>

    <ParamField name="date_of_birth" body="associated_persons.date_of_birth" type="string">
    </ParamField>

    <ParamField name="gender" body="associated_persons.gender" type="string">

      Possible values: `male`, `female`, `other`
    </ParamField>

    <ParamField name="phone" body="associated_persons.phone" type="string">
    </ParamField>

    <ParamField name="address" body="associated_persons.address" type="object">

      <Expandable title="properties">
        <ParamField name="address_line1" body="associated_persons.address.address_line1" type="string" required>
        </ParamField>

        <ParamField name="address_line2" body="associated_persons.address.address_line2" type="string">
        </ParamField>

        <ParamField name="city" body="associated_persons.address.city" type="string" required>
        </ParamField>

        <ParamField name="postal_code" body="associated_persons.address.postal_code" type="string" required>
        </ParamField>

        <ParamField name="state" body="associated_persons.address.state" type="string" required>
        </ParamField>

        <ParamField name="country" body="associated_persons.address.country" type="string" required>
        </ParamField>

      </Expandable>
    </ParamField>

  </Expandable>
</ParamField>

### Request Examples

<RequestExample>

```json title="UpdateIndividual"
{
  "customer_id": "e59daa17-20ed-4727-833c-e1c633782cc8",
  "first_name": "Jane",
  "last_name": "Smith",
  "phone": "+15555550199"
}
```

```json title="UpdateBusiness"
{
  "customer_id": "e59daa17-20ed-4727-833c-e1c633782cc8",
  "business_name": "Acme Corp Ltd",
  "business_description": "Enterprise software solutions",
  "business_type": "private_limited",
  "business_industry": "Technology",
  "registration_number": "RC-111222",
  "associated_persons": [
    {
      "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "first_name": "Jane",
      "last_name": "Doe",
      "phone": "+15555550102"
    }
  ]
}
```

</RequestExample>

## Responses

| Status | Description |
| --- | --- |
| `200` | Customer updated |
| `400` | Bad request — invalid or missing parameters |

### 200 response

<ResponseField name="data" type="object">

  <Expandable title="properties">
    <ResponseField name="message" type="string">
    </ResponseField>

    <ResponseField name="status" type="boolean">
    </ResponseField>

  </Expandable>
</ResponseField>

<ResponseField name="error" type="null">
</ResponseField>

<ResponseExample>

```json title="Response"
{
  "data": {
    "message": "customer updated successfully",
    "status": true
  },
  "error": null
}
```

</ResponseExample>

### 400 response

<ResponseField name="data" type="null">
</ResponseField>

<ResponseField name="error" type="string">
</ResponseField>

<ResponseExample>

```json title="Response"
{
  "data": null,
  "error": "invalid request body"
}
```

</ResponseExample>

## Authorization

- **ApiKeyAuth**
