> 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.

# Create Customers

POST https://api.bigcommerce.com/stores/{store_hash}/v3/customers
Content-Type: application/json

Creates Customers. Create up to 10 customers in one call.

**Required Fields**
* last_name
* first_name
* email

**Required Fields Customer Address**
* first_name
* city
* country_code
* last_name
* address1

**Required Fields Attributes**
* Attributes must be [created](/developer/api-reference/rest/admin/management/customers/v3/attributes/create-customers-attributes) **BEFORE** creating a customer.
* attribute_id
* attribute_value -- This is input as a string, regardless of the [Type](/developer/api-reference/rest/admin/management/customers/v3/attributes/create-customers-attributes).

**Notes**

A customer can be created with global access or channel-specific access.
* **Global access:**
  * Make sure the channel has `allow_global_logins` enabled. This is on by default only for the default storefront. Find more info at [Customer Settings > Channel](/developer/api-reference/rest/admin/management/customers/v3/channel-settings).
  * Omit `channel_ids` field, or provide `channel_ids: null`.
* **Channel-specific access:**
  * Provide a `channel_ids` array containing the channels accessible by the customer. This array cannot be empty.

Reference: https://docs.bigcommerce.com/developer/api-reference/rest/admin/management/customers/v3/create-customers

## 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` | | Stored Payment Instruments | modify | `store_stored_payment_instruments` | | Stored Payment Instruments | read-only | `store_stored_payment_instruments_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

- `store_hash` (string, required) — Permanent ID of the BigCommerce store.

### Body (application/json)

This endpoint expects a list of customer_Post.

- `list of customer_Post`

## Response

### 200

Customer Collection Response

- `data` (list of customer_Full, optional)
- `meta` (MetaOpen, optional) — Response metadata.

## Errors

### 413 Content Too Large Error

The request payload is too large. The maximum number of items allowed in the array is 10.

- `any`

### 422 Unprocessable Entity Error

The *Customer* was not valid. This is the result of missing required fields or trying to edit a read only field. See the response for more details.

- `status` (integer, optional) — The HTTP status code.
- `title` (string, optional) — The error title describing the particular error.
- `type` (string, optional) — A link to a list of BigCommerce API status codes.
- `instance` (string, optional)
- `errors` (ErrorResponseErrors, optional)

## Types

### customer_Post

- `email` (string, required) — The email of the customer. Must be unique.
- `first_name` (string, required) — The first name of the customer.
- `last_name` (string, required) — The last name of the customer.
- `company` (string, optional) — The company of the customer.
- `phone` (string, optional) — The phone number of the customer.
- `notes` (string, optional) — The customer notes.
- `tax_exempt_category` (string, optional) — The tax exempt category code for the customer.
- `customer_group_id` (integer, optional) — ID of the group which this customer belongs to.
- `addresses` (list of customerAddresses_CustomerPost, optional) — Array of customer addresses. Limited to 10.
- `attributes` (list of customerAttributes_Base, optional) — Array of customer attributes. Limited to 10.
- `authentication` (customerAuthentication_PostPut, optional)
- `accepts_product_review_abandoned_cart_emails` (boolean, optional) — It determines if the customer is signed up to receive either product review or abandoned cart emails or receive both emails.
- `store_credit_amounts` (list of CustomerStoredCreditAmountsItems, optional) — Store credit.
- `origin_channel_id` (integer, optional) — Channel ID of the customer that has created the form.
- `channel_ids` (list of integer, optional) — Array of channels the customer can access.
- `form_fields` (list of formFieldValue, optional) — Array of form fields. Controlled by formfields parameter.
- `trigger_account_created_notification` (boolean, optional) — Indicates whether to send a customer registered welcome email.

### customer_Full

- `email` (string, optional) — The email of the customer. Must be unique.
- `first_name` (string, optional) — The first name of the customer.
- `last_name` (string, optional) — The last name of the customer.
- `company` (string, optional) — The company of the customer.
- `phone` (string, optional) — The phone number of the customer.
- `registration_ip_address` (string, optional) — The IP address from which this customer was registered.
- `notes` (string, optional) — The customer notes.
- `tax_exempt_category` (string, optional) — The tax exempt category code for the customer.
- `customer_group_id` (integer, optional) — ID of the group which this customer belongs to.
- `id` (integer, optional) — The unique numeric ID of the customer.
- `date_modified` (datetime, optional) — The date on which the customer was modified.
- `date_created` (datetime, optional) — The date of which the customer was created.
- `address_count` (integer, optional) — Total number of customer addresses.
- `attribute_count` (integer, optional) — Total number of customer attributes.
- `authentication` (CustomerFullAuthentication, optional)
- `addresses` (list of address_Full, optional) — Array of customer addresses. Limited to 10.
- `attributes` (list of attribute_Full, optional) — Array of customer attributes. Limited to 10.
- `form_fields` (list of formFieldValue_Customer, optional) — Array of form fields. Controlled by `formfields` parameter.
- `store_credit_amounts` (list of CustomerStoredCreditAmountsItems, optional) — Store credit.
- `accepts_product_review_abandoned_cart_emails` (boolean, optional) — Determines if the customer is signed up to receive either product review or abandoned cart emails or receive both emails.
- `origin_channel_id` (integer, optional) — Channel ID of the customer that has created the form.
- `channel_ids` (list of any, optional) — Array of channel ids the Customer has access to.

### MetaOpen

Response metadata.

### ErrorResponseErrors

### customerAddresses_CustomerPost

The `address` object for the `customer` objectʼs `addresses` array.

- `first_name` (string, required) — The first name associated with the customer address.
- `last_name` (string, required) — The last name of the customer address.
- `address1` (string, required) — The address 1 line.
- `city` (string, required) — The city of the customer address.
- `country_code` (string, required) — The country code of the customer address.
- `company` (string, optional) — The company of the customer address.
- `address2` (string, optional) — The address 2 line.
- `state_or_province` (string, optional) — The state or province name. Required for countries in which valid addresses must contain a state/province.
- `postal_code` (string, optional) — The postal code of the customer address. Required for countries in which valid addresses must have postal codes.
- `phone` (string, optional) — The phone number of the customer address.
- `address_type` (enum, optional) — The address type. Residential or Commercial.
  - Allowed values: `residential`, `commercial`
- `form_fields` (list of formFieldValue, optional) — Array of form fields. Controlled by `formfields` parameter.

### customerAttributes_Base

- `attribute_id` (integer, optional) — Attribute ID.
- `attribute_value` (string, optional) — Attribute value. This will always be a string, regardless of the attribute’s type.

### customerAuthentication_PostPut

- `force_password_reset` (boolean, optional) — If `true`, this customer will be forced to change password on next login.
- `new_password` (string, optional) — New password for customer. Write only field.

### CustomerStoredCreditAmountsItems

- `amount` (float, optional)

### formFieldValue

- `name` (string, required) — The form field name.
- `value` (FormFieldValueValue, required)

### CustomerFullAuthentication

- `force_password_reset` (boolean, optional) — If `true`, this customer will be forced to change password on next login.

### address_Full

- `first_name` (string, required) — The first name of the customer address.
- `last_name` (string, required) — The last name of the customer address.
- `address1` (string, required) — The address 1 line.
- `city` (string, required) — The city of the customer address.
- `state_or_province` (string, required) — The state or province name.
- `postal_code` (string, required) — The postal code of the customer address.
- `country_code` (string, required) — The country code of the customer address.
- `customer_id` (integer, required) — The customer ID.
- `id` (integer, required) — The unique numeric ID of the address.
- `company` (string, optional) — The company of the customer address.
- `address2` (string, optional) — The address 2 line.
- `phone` (string, optional) — The phone number of the customer address.
- `address_type` (enum, optional) — The address type. Residential or Commercial.
  - Allowed values: `residential`, `commercial`
- `country` (string, optional) — The country name of the customer address.
- `form_fields` (list of formFieldValue, optional) — Array of form fields. Controlled by `formfields` parameter.

### attribute_Full

- `attribute_id` (integer, optional) — Attribute ID.
- `attribute_value` (string, optional) — Attribute value.
- `customer_id` (integer, optional) — Customer ID.
- `date_created` (datetime, optional) — The date the customer attribute was created.
- `date_modified` (datetime, optional) — The date the customer attribute was modified.
- `id` (integer, optional) — Attribute value ID.

### formFieldValue_Customer

- `name` (string, required) — The form field name.
- `value` (FormFieldValueCustomerValue, required)
- `customer_id` (integer, required)

### FormFieldValueValue

### FormFieldValueCustomerValue

## Examples

**Request**

```json
[
  {
    "email": "string",
    "first_name": "string",
    "last_name": "string"
  }
]
```

**Response**

```json
{
  "data": [
    {
      "email": "string",
      "first_name": "string",
      "last_name": "string",
      "company": "string",
      "phone": "string",
      "registration_ip_address": "string",
      "notes": "string",
      "tax_exempt_category": "string",
      "customer_group_id": 1,
      "id": 1,
      "date_modified": "2024-01-15T09:30:00Z",
      "date_created": "2024-01-15T09:30:00Z",
      "address_count": 1,
      "attribute_count": 1,
      "authentication": {
        "force_password_reset": true
      },
      "addresses": [
        {
          "first_name": "string",
          "last_name": "string",
          "address1": "string",
          "city": "string",
          "state_or_province": "string",
          "postal_code": "string",
          "country_code": "string",
          "customer_id": 1,
          "id": 1,
          "company": "string",
          "address2": "string",
          "phone": "string",
          "address_type": "residential",
          "country": "string",
          "form_fields": [
            {
              "name": "color",
              "value": "blue"
            }
          ]
        }
      ],
      "attributes": [
        {
          "attribute_id": 2,
          "attribute_value": "Yes",
          "customer_id": 1,
          "date_created": "2024-01-15T09:30:00Z",
          "date_modified": "2024-01-15T09:30:00Z",
          "id": 2
        }
      ],
      "form_fields": [
        {
          "name": "color",
          "value": "blue",
          "customer_id": 1
        }
      ],
      "store_credit_amounts": [
        {
          "amount": 43.15
        }
      ],
      "accepts_product_review_abandoned_cart_emails": true,
      "origin_channel_id": 1,
      "channel_ids": [
        null
      ]
    }
  ],
  "meta": {}
}
```

**SDK Code**

```python
import requests

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

payload = [
    {
        "email": "string",
        "first_name": "string",
        "last_name": "string"
    }
]
headers = {
    "X-Auth-Token": "<apiKey>",
    "Content-Type": "application/json"
}

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

print(response.json())
```

```javascript
const url = 'https://api.bigcommerce.com/stores/store_hash/v3/customers';
const options = {
  method: 'POST',
  headers: {'X-Auth-Token': '<apiKey>', 'Content-Type': 'application/json'},
  body: '[{"email":"string","first_name":"string","last_name":"string"}]'
};

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/v3/customers"

	payload := strings.NewReader("[\n  {\n    \"email\": \"string\",\n    \"first_name\": \"string\",\n    \"last_name\": \"string\"\n  }\n]")

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

	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/v3/customers")

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

request = Net::HTTP::Post.new(url)
request["X-Auth-Token"] = '<apiKey>'
request["Content-Type"] = 'application/json'
request.body = "[\n  {\n    \"email\": \"string\",\n    \"first_name\": \"string\",\n    \"last_name\": \"string\"\n  }\n]"

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.post("https://api.bigcommerce.com/stores/store_hash/v3/customers")
  .header("X-Auth-Token", "<apiKey>")
  .header("Content-Type", "application/json")
  .body("[\n  {\n    \"email\": \"string\",\n    \"first_name\": \"string\",\n    \"last_name\": \"string\"\n  }\n]")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.bigcommerce.com/stores/store_hash/v3/customers', [
  'body' => '[
  {
    "email": "string",
    "first_name": "string",
    "last_name": "string"
  }
]',
  'headers' => [
    '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/v3/customers");
var request = new RestRequest(Method.POST);
request.AddHeader("X-Auth-Token", "<apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "[\n  {\n    \"email\": \"string\",\n    \"first_name\": \"string\",\n    \"last_name\": \"string\"\n  }\n]", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

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

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

let request = NSMutableURLRequest(url: NSURL(string: "https://api.bigcommerce.com/stores/store_hash/v3/customers")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
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()
```