> ## Documentation Index
> Fetch the complete documentation index at: https://wpay-feat-edp-guide.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Update a buyer

> Update the details for a customer record.

You can update a buyer by calling the [`PUT /buyers/{buyers_id}`][api] API. The
call accepts an optional update to the `external_identifier` (for example the
user's email, username, or a database ID) and an optional update to the
`display_name` which will be shown in the admin panel.

<CodeGroup>
  ```bash cURL
  curl -i -X PUT "https://api.example.gr4vy.app/buyers/fe26475d-ec3e-4884-9553-f7356683f7f9" \
      -H "Authorization: Bearer [JWT_TOKEN]" \
      -H "Content-Type: application/json" \
      -d '{
          "display_name": "John D."
        }'
  ```

  ```js Node
  const buyerId = "fe26475d-ec3e-4884-9553-f7356683f7f9";
  const buyerRequest = new BuyerUpdateRequest();
  buyerRequest.displayName = "John D.";

  const updatedBuyer = await client.updateBuyer(buyerId, buyerRequest);
  console.log(updatedBuyer.body.display_name);
  ```
</CodeGroup>

The API returns an updated buyer resource.

```json PUT /buyers/fe26475d-ec3e-4884-9553-f7356683f7f9
{
  "type": "buyer",
  "id": "fe26475d-ec3e-4884-9553-f7356683f7f9",
  "external_identifier": "412231123",
  "display_name": "John D.",
  "created_at": "2013-07-16T19:23:00.000Z",
  "updated_at": "2013-07-16T19:23:00.000Z"
}
```

[api]: /reference/buyers/update-buyer
