customerCreate
Creates a new customer account and returns an access token.
Authentication
Authentication Required: Secret API key with scope
customer:auth
Mutation Structure
mutation {
customerCreate(input: CustomerCreateInput!) {
customer {
# Customer fields
}
customerAccessToken {
# CustomerAccessToken fields
}
customerUserErrors {
# CustomerUserError fields
}
}
}Input Arguments
| Argument | Type | Required | Description |
|---|---|---|---|
| input | CustomerCreateInput | Yes | The input for creating a new customer |
Return Type
CustomerCreatePayload - Payload returned by the customerCreate mutation. Contains the created customer, customer access token, and any errors that occurred during the operation.
Example
mutation {
customerCreate(input: {
firstName: "John"
lastName: "Doe"
email: "john.doe@example.com"
password: "securePassword123"
}) {
customer {
id
email
firstName
lastName
}
customerAccessToken {
accessToken
expiresAt
}
customerUserErrors {
field
message
}
}
}