Create Customer

Deprecated
Creates a *Customer*. **Required Fields** * `first_name` * `last_name` * `email` **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: ```json { "_authentication": { "password": "12w69Y217PYR96J" } } ``` ## Confirming Passwords An additional optional `password_confirmation` field can also be sent, providing password confirmation as a service: ```json { "_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 } } ```

Authentication

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

This endpoint expects an object.
_authenticationobjectOptional

This can vary depending on the action being taken to update, validate or force a password change. See Customers V2, Update a customer (Deprecated).

companystringOptional
first_namestringOptional
last_namestringOptional
phonestringOptional
date_modifiedstringOptional
store_creditintegerOptional
registration_ip_addressstringOptional
customer_group_idintegerOptional
notesstringOptional
tax_exempt_categorystringOptional

Response

emailstring
Email address of the customer.
first_namestring
First name of the customer.
last_namestring
Last name of the customer.
_authenticationobject

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.

accepts_marketingbooleanRead-only

Describes whether the customer accepts product review emails or abandon cart emails. Read-Only.

addressesobject
companystring
The name of the company for which the customer works.
customer_group_idinteger
The group to which the customer belongs.
date_createdstringRead-only

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_modifiedstringRead-only

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.

form_fieldslist of objects or nullRead-only

Array of custom fields. This is a Read-Only field; do not set or modify its value in a POST or PUT request.

idintegerRead-only

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.

notesstring

Store-owner notes on the customer.

phonestring
Phone number of the customer.
registration_ip_addressstring

The customer’s IP address when they signed up.

reset_pass_on_loginboolean
Force a password change on next login.
store_creditstring

The amount of credit the customer has. (Float, Float as String, Integer)

tax_exempt_categorystring

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.