> This page is for Developer.

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.bigcommerce.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.bigcommerce.com/_mcp/server.

# Update Customer

PUT https://api.bigcommerce.com/stores/{store_hash}/v2/customers/{customer_id}
Content-Type: application/json

Updates a *Customer*.

**Read Only Fields**

* id
* date\_created
* date\_modified
* accepts\_marketing
* addresses
* form\_fields

## Notes

The `_authentication` object exposes functionality associated with the customer’s ability to log in to the store. All properties of the `_authentication` object are optional.
When the `_authentication` object is not supplied with an update request, then the existing customer password remains the same.

## Updating Passwords

To manually update a customer password in the same way as the control panel, supply a value for the `password` field:

```js showLineNumbers copy
{
    "_authentication": {
        "password": "12w69Y217PYR96J"
    }
}

```

#### Confirming Passwords

An additional optional `password_confirmation` field can also be sent, providing password confirmation as a service:

```js showLineNumbers copy
{
    "_authentication": {
       "password": "12w69Y217PYR96J"
       "password_confirmation": "12w69Y217PYR96J"
    }
}
```

#### Forcing Password Resets

To force a customer to reset their password upon their next login attempt, give the `force_reset` field a value of true, as shown here:

```js showLineNumbers copy
{
    "_authentication": {
        "force_reset": true
    }
}
```

Reference: https://docs.bigcommerce.com/developer/api-reference/rest/admin/management/customers/v2/update-customer

## Authentication

- `X-Auth-Token` header (required) — ### OAuth scopes | UI Name | Permission | Parameter | |:--------|:-----------|:----------| | Customers | modify | `store_v2_customers` | | Customers | read-only | `store_v2_customers_read_only` | ### Authentication header | Header | Argument | Description | |:-------|:---------|:------------| | `X-Auth-Token` | `access_token` | For more about API accounts that generate `access_token`s, see our [Guide to API Accounts](/developer/docs/overview/api-fundamentals/api-accounts#api-accounts). | ### Further reading For example requests and more information about authenticating BigCommerce APIs, see [Authentication and Example Requests](/developer/docs/overview/api-fundamentals/api-accounts#x-auth-token-header-example-requests). For more about BigCommerce OAuth scopes, see our [Guide to API Accounts](/developer/docs/overview/api-fundamentals/api-accounts#oauth-scopes). For a list of API status codes, see [API Status Codes](/developer/api-reference/rest/overview#rest-http-status-codes).

## Request

### Path parameters

- `customer_id` (integer, required) — Unique numeric ID of the customer.
- `store_hash` (string, required) — Permanent ID of the BigCommerce store.

### Headers

- `Accept` (string, required, default: application/json) — The [MIME type](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types) of the response body.

### Body (application/json)

This endpoint expects a customer_Put.

- `id` (integer, optional) — Unique numeric ID of this customer. This is a Read-Only field; do not set or modify its value in a POST or PUT request.
- `_authentication` (CustomerPutAuthentication, optional) — Not returned in any responses, but accepts up to two fields allowing you to set the customer’s password. If a password is not supplied, it is generated automatically. For further information about using this object, please see the Customers resource documentation.
- `company` (string, optional) — The name of the company for which the customer works.
- `first_name` (string, optional) — First name of the customer.
- `last_name` (string, optional) — Last name of the customer.
- `email` (string, optional) — Email address of the customer.
- `phone` (string, optional) — Phone number of the customer.
- `date_created` (string, optional) — Date on which the customer registered from the storefront or was created in the control panel. This is a Read-Only field; do not set or modify its value in a POST or PUT request.
- `date_modified` (string, optional) — Date on which the customer updated their details in the storefront or was updated in the control panel. This is a READ-ONLY field; do not set or modify its value in a POST or PUT request.
- `store_credit` (string, optional) — The amount of credit the customer has. (Float, Float as String, Integer)
- `registration_ip_address` (string, optional) — The customer’s IP address when they signed up.
- `customer_group_id` (integer, optional) — The group to which the customer belongs.
- `notes` (string, optional) — Store-owner notes on the customer.
- `tax_exempt_category` (string, optional) — If applicable, the tax-exempt category of the shopper’s customer account. You can apply a tax-exempt category to multiple customers. This code should match the exemption codes provided by the third-party integration.
- `accepts_marketing` (boolean, optional) — Describes whether the customer accepts product review emails and abandon cart emails. Read-Only.
- `addresses` (CustomerPutAddresses, optional)
- `form_fields` (list of CustomerPutFormFieldsItems, optional) — Array of custom fields. This is a Read-Only field; do not set or modify its value in a POST or PUT request.
- `reset_pass_on_login` (boolean, optional) — Force a password change on next login.

## Response

### 200

OK

- `first_name` (string, required) — First name of the customer.
- `last_name` (string, required) — Last name of the customer.
- `email` (string, required) — Email address of the customer.
- `_authentication` (CustomerBaseAuthentication, optional) — Not returned in any responses, but accepts up to two fields allowing you to set the customer’s password. If a password is not supplied, it is generated automatically. For further information about using this object, please see the Customers resource documentation.
- `company` (string, optional) — The name of the company for which the customer works.
- `phone` (string, optional) — Phone number of the customer.
- `store_credit` (string, optional) — The amount of credit the customer has. (Float, Float as String, Integer)
- `registration_ip_address` (string, optional) — The customer’s IP address when they signed up.
- `customer_group_id` (integer, optional) — The group to which the customer belongs.
- `notes` (string, optional) — Store-owner notes on the customer.
- `tax_exempt_category` (string, optional) — If applicable, the tax-exempt category of the shopper’s customer account. You can apply a tax-exempt category to multiple customers. This code should match the exemption codes provided by the third-party integration.
- `accepts_marketing` (boolean, optional) — Describes whether the customer accepts product review emails or abandon cart emails. Read-Only.
- `addresses` (CustomerBaseAddresses, optional)
- `form_fields` (list of CustomerBaseFormFieldsItems, optional, nullable) — Array of custom fields. This is a Read-Only field; do not set or modify its value in a POST or PUT request.
- `reset_pass_on_login` (boolean, optional) — Force a password change on next login.

## Types

### CustomerPutAuthentication

Not returned in any responses, but accepts up to two fields allowing you to set the customer’s password. If a password is not supplied, it is generated automatically. For further information about using this object, please see the Customers resource documentation.

- `force_reset` (boolean, optional)
- `password` (string, optional)
- `password_confirmation` (string, optional)

### CustomerPutAddresses

- `url` (string, optional) — Full URL of where the resource is located.
- `resource` (string, optional) — Resource being accessed.

### CustomerPutFormFieldsItems

- `name` (string, optional) — Name of the form field.
- `value` (string, optional) — Value of the form field.

### CustomerBaseAuthentication

Not returned in any responses, but accepts up to two fields allowing you to set the customer’s password. If a password is not supplied, it is generated automatically. For further information about using this object, please see the Customers resource documentation.

- `force_reset` (boolean, optional)
- `password` (string, optional)
- `password_confirmation` (string, optional)

### CustomerBaseAddresses

- `url` (string, optional) — Full URL of where the resource is located.
- `resource` (string, optional) — Resource being accessed.

### CustomerBaseFormFieldsItems

- `name` (string, optional) — Name of the form field.
- `value` (string, optional, nullable) — Value of the form field.

## Examples

**Request**

```json
{}
```

**Response**

```json
{
  "first_name": "Jane",
  "last_name": "Doe",
  "email": "janedoe@example.com",
  "_authentication": {
    "force_reset": true,
    "password": "string",
    "password_confirmation": "string"
  },
  "company": "BigCommerce",
  "phone": "1234567890",
  "store_credit": "0",
  "registration_ip_address": "12.345.678.910",
  "customer_group_id": 2,
  "notes": "string",
  "tax_exempt_category": "string",
  "accepts_marketing": true,
  "addresses": {
    "url": "https://api.bigcommerce.com/stores/{store_hash}/v2/customers/5/addresses",
    "resource": "/customers/5/addresses"
  },
  "form_fields": [
    {
      "name": "License ID",
      "value": "string"
    }
  ],
  "reset_pass_on_login": false
}
```

**SDK Code**

```python
import requests

url = "https://api.bigcommerce.com/stores/store_hash/v2/customers/1"

payload = {}
headers = {
    "Accept": "application/json",
    "X-Auth-Token": "<apiKey>",
    "Content-Type": "application/json"
}

response = requests.put(url, json=payload, headers=headers)

print(response.json())
```

```javascript
const url = 'https://api.bigcommerce.com/stores/store_hash/v2/customers/1';
const options = {
  method: 'PUT',
  headers: {
    Accept: 'application/json',
    'X-Auth-Token': '<apiKey>',
    'Content-Type': 'application/json'
  },
  body: '{}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.bigcommerce.com/stores/store_hash/v2/customers/1"

	payload := strings.NewReader("{}")

	req, _ := http.NewRequest("PUT", url, payload)

	req.Header.Add("Accept", "application/json")
	req.Header.Add("X-Auth-Token", "<apiKey>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api.bigcommerce.com/stores/store_hash/v2/customers/1")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Put.new(url)
request["Accept"] = 'application/json'
request["X-Auth-Token"] = '<apiKey>'
request["Content-Type"] = 'application/json'
request.body = "{}"

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.put("https://api.bigcommerce.com/stores/store_hash/v2/customers/1")
  .header("Accept", "application/json")
  .header("X-Auth-Token", "<apiKey>")
  .header("Content-Type", "application/json")
  .body("{}")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('PUT', 'https://api.bigcommerce.com/stores/store_hash/v2/customers/1', [
  'body' => '{}',
  'headers' => [
    'Accept' => 'application/json',
    'Content-Type' => 'application/json',
    'X-Auth-Token' => '<apiKey>',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://api.bigcommerce.com/stores/store_hash/v2/customers/1");
var request = new RestRequest(Method.PUT);
request.AddHeader("Accept", "application/json");
request.AddHeader("X-Auth-Token", "<apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "Accept": "application/json",
  "X-Auth-Token": "<apiKey>",
  "Content-Type": "application/json"
]
let parameters = [] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.bigcommerce.com/stores/store_hash/v2/customers/1")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "PUT"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```