Create Customers

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-a-customer-attribute) **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-a-customer-attribute). **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.

Authentication

X-Auth-Tokenstring
### 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

emailstringRequired3-250 characters
The email of the customer. Must be unique.
first_namestringRequired1-100 characters
The first name of the customer.
last_namestringRequired1-100 characters
The last name of the customer.
companystringOptional0-255 characters
The company of the customer.
phonestringOptional0-50 characters
The phone number of the customer.
notesstringOptional
The customer notes.
tax_exempt_categorystringOptional0-255 characters
The tax exempt category code for the customer.
customer_group_idintegerOptional
ID of the group which this customer belongs to.
addresseslist of objectsOptional
Array of customer addresses. Limited to 10.
attributeslist of objectsOptional
Array of customer attributes. Limited to 10.
authenticationobjectOptional
accepts_product_review_abandoned_cart_emailsbooleanOptional
It determines if the customer is signed up to receive either product review or abandoned cart emails or receive both emails.
store_credit_amountslist of objectsOptional
Store credit.
origin_channel_idintegerOptional
Channel ID of the customer that has created the form.
channel_idslist of integersOptional
Array of channels the customer can access.
form_fieldslist of objectsOptional
Array of form fields. Controlled by formfields parameter.
trigger_account_created_notificationbooleanOptional
Indicates whether to send a customer registered welcome email.

Response

Customer Collection Response
datalist of objects
metaobject
Response metadata.

Errors

413
Content Too Large Error
422
Unprocessable Entity Error