--- title: customerCreate - Storefront API description: Creates a new customer. api_version: 2026-01 api_name: storefront type: mutation api_type: graphql source_url: html: 'https://shopify.dev/docs/api/storefront/latest/mutations/customerCreate' md: 'https://shopify.dev/docs/api/storefront/latest/mutations/customerCreate.md' --- # customer​Create mutation Requires `unauthenticated_write_customers` access scope. Creates a new customer. ## Arguments * input [Customer​Create​Input!](https://shopify.dev/docs/api/storefront/latest/input-objects/CustomerCreateInput) required The fields used to create a new customer. *** ## Customer​Create​Payload returns * customer [Customer](https://shopify.dev/docs/api/storefront/latest/objects/Customer) The created customer object. * customer​User​Errors [\[Customer​User​Error!\]!](https://shopify.dev/docs/api/storefront/latest/objects/CustomerUserError) non-null The list of errors that occurred from executing the mutation. * user​Errors [\[User​Error!\]!](https://shopify.dev/docs/api/storefront/latest/objects/UserError) non-nullDeprecated The list of errors that occurred from executing the mutation. *** ## Examples * ### Create a customer #### Description Create a new customer #### Query ```graphql mutation customerCreate($input: CustomerCreateInput!) { customerCreate(input: $input) { customer { firstName lastName email phone acceptsMarketing } customerUserErrors { field message code } } } ``` #### Variables ```json { "input": { "firstName": "John", "lastName": "Smith", "email": "johnsmith@shopify.com", "phone": "+15146669999", "password": "5hopify", "acceptsMarketing": true } } ``` #### cURL ```bash curl -X POST \ https://your-development-store.myshopify.com/api/2026-01/graphql.json \ -H 'Content-Type: application/json' \ -H 'X-Shopify-Storefront-Access-Token: {storefront_access_token}' \ -d '{ "query": "mutation customerCreate($input: CustomerCreateInput!) { customerCreate(input: $input) { customer { firstName lastName email phone acceptsMarketing } customerUserErrors { field message code } } }", "variables": { "input": { "firstName": "John", "lastName": "Smith", "email": "johnsmith@shopify.com", "phone": "+15146669999", "password": "5hopify", "acceptsMarketing": true } } }' ``` #### React Router ```javascript import { unauthenticated } from "../shopify.server"; export const loader = async () => { const { storefront } = await unauthenticated.storefront( 'your-development-store.myshopify.com' ); const response = await storefront.graphql( `#graphql mutation customerCreate($input: CustomerCreateInput!) { customerCreate(input: $input) { customer { firstName lastName email phone acceptsMarketing } customerUserErrors { field message code } } }`, { variables: { "input": { "firstName": "John", "lastName": "Smith", "email": "johnsmith@shopify.com", "phone": "+15146669999", "password": "5hopify", "acceptsMarketing": true } }, }, ); const json = await response.json(); return json.data; } ``` #### Node.js ```javascript const client = new shopify.clients.Storefront({ domain: 'your-development-store.myshopify.com', storefrontAccessToken, }); const data = await client.query({ data: { "query": `mutation customerCreate($input: CustomerCreateInput!) { customerCreate(input: $input) { customer { firstName lastName email phone acceptsMarketing } customerUserErrors { field message code } } }`, "variables": { "input": { "firstName": "John", "lastName": "Smith", "email": "johnsmith@shopify.com", "phone": "+15146669999", "password": "5hopify", "acceptsMarketing": true } }, }, }); ``` #### Response ```json { "customerCreate": { "customer": { "firstName": "John", "lastName": "Smith", "email": "johnsmith@shopify.com", "phone": "+15146669999", "acceptsMarketing": true }, "customerUserErrors": [] } } ``` * ### customerCreate reference