Requires unauthenticated_write_customers access scope.

Updates an existing customer.


The customer object input.

Anchor to customerAccessToken
customerAccessToken
required

The access token used to identify the customer.


Was this section helpful?

The updated customer object.

The newly created customer access token. If the customer's password is updated, all previous access tokens (including the one used to perform this mutation) become invalid, and a new token is generated.

The list of errors that occurred from executing the mutation.

The list of errors that occurred from executing the mutation. Use customerUserErrors instead.


Was this section helpful?
Hide code
Mutation reference
Copy
mutation customerUpdate($customer: CustomerUpdateInput!, $customerAccessToken: String!) {
  customerUpdate(customer: $customer, customerAccessToken: $customerAccessToken) {
    customer {
      # Customer fields
    }
    customerAccessToken {
      # CustomerAccessToken fields
    }
    customerUserErrors {
      # CustomerUserError fields
    }
    userErrors {
      field
      message
    }
  }
}
Hide code
Input
Copy
{
  "customer": {
    "acceptsMarketing": true,
    "email": "<your-email>",
    "firstName": "<your-firstName>",
    "lastName": "<your-lastName>",
    "password": "<your-password>",
    "phone": "<your-phone>"
  },
  "customerAccessToken": "<your-customerAccessToken>"
}
input CustomerUpdateInput {
  acceptsMarketing: Boolean
  email: String
  firstName: String
  lastName: String
  password: String
  phone: String
}