Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
I am using Shopify's GraphQL mutations in order to create a customer on a button click on the front end of my website. The user is prompted for an email, on submit, they will receive an email to activate their account. The "customerCreate" mutation in the documentation does not state that password is required, however my API response states that a password is required in my post request, can anyone help me to create an account without requiring a password? Here is the shopify documentation . Thank you in advance for any help
mutation customerCreate($input: CustomerCreateInput!) { customerCreate(input: $input) { customerUserErrors { code field message } customer { id } } } { "input": { "email": "example@gmail.com", "acceptsMarketing": true } }
Error message: "message": "Variable $input of type CustomerCreateInput! was provided invalid value for password (Expected value to not be null)",
Hi @olansgz,
In the Shopify GraphQL API, it is possible to create a customer without requiring a password by omitting the password field in the input object of the customerCreate mutation. The customerCreate mutation allows you to specify a number of optional fields in addition to the required email field, but the password field is not one of them.
Therefore, you can simply leave out the password field in your GraphQL request, and Shopify will create the customer without requiring a password.
Here is an example of a GraphQL request that creates a customer without requiring a password:
mutation {
customerCreate(input: {
email: "example@gmail.com",
acceptsMarketing: true
}) {
customerUserErrors {
code
field
message
}
customer {
id
}
}
}
Note that if you do not specify a password, the customer will not be able to log in to their account until they set a password.
I hope this helps! Let me know if you have any questions or if there is anything else I can assist you with.
June brought summer energy to our community. Members jumped in with solutions, clicked ...
By JasonH Jun 5, 2025Learn how to build powerful custom workflows in Shopify Flow with expert guidance from ...
By Jacqui May 7, 2025Did You Know? May is named after Maia, the Roman goddess of growth and flourishing! ...
By JasonH May 2, 2025