Skip to Content

customerCreate

Creates a new customer account and returns an access token.

Authentication

Authentication Required: Secret API key with scope customer:write

Mutation Structure

mutation { customerCreate(input: CustomerCreateInput!) { customer { id email firstName lastName } customerAccessToken { accessToken expiresAt } customerUserErrors { field message } } }

Input Arguments

ArgumentTypeRequiredDescription
inputCustomerCreateInputYesThe input for creating a new customer

Return Type

CustomerCreatePayload - Payload returned by the customerCreate mutation. Contains the created customer, access token for authentication, and any validation errors that occurred during the operation.

Example

mutation { customerCreate(input: { email: "john.doe@example.com" password: "SecurePassword123!" firstName: "John" lastName: "Doe" }) { customer { id email firstName lastName } customerAccessToken { accessToken expiresAt } customerUserErrors { field message } } }