--- title: CustomerUserError - Storefront API description: Represents an error that happens during execution of a customer mutation. api_version: unstable api_name: storefront source_url: html: 'https://shopify.dev/docs/api/storefront/unstable/objects/CustomerUserError' md: >- https://shopify.dev/docs/api/storefront/unstable/objects/CustomerUserError.md --- # Customer​User​Error object Represents an error that happens during execution of a customer mutation. ## Fields * code [Customer​Error​Code](https://shopify.dev/docs/api/storefront/unstable/enums/CustomerErrorCode) The error code. * field [\[String!\]](https://shopify.dev/docs/api/storefront/unstable/scalars/String) The path to the input field that caused the error. * message [String!](https://shopify.dev/docs/api/storefront/unstable/scalars/String) non-null The error message. *** ## Map No referencing types *** ## Mutations * [customer​Access​Token​Create](https://shopify.dev/docs/api/storefront/unstable/mutations/customerAccessTokenCreate) mutation For legacy customer accounts only. Creates a [`CustomerAccessToken`](https://shopify.dev/docs/api/storefront/unstable/objects/CustomerAccessToken) using the customer's email and password. The access token is required to read or modify the [`Customer`](https://shopify.dev/docs/api/storefront/unstable/objects/Customer) object, such as updating account information or managing addresses. The token has an expiration time. Use [`customerAccessTokenRenew`](https://shopify.dev/docs/api/storefront/unstable/mutations/customerAccessTokenRenew) to extend the token before it expires, or create a new token if it's already expired. *** **Caution:** This mutation handles customer credentials. Always transmit requests over HTTPS and never log or expose the password. *** * input [Customer​Access​Token​Create​Input!](https://shopify.dev/docs/api/storefront/unstable/input-objects/CustomerAccessTokenCreateInput) required ### Arguments The fields used to create a customer access token. *** * [customer​Access​Token​Create​With​Multipass](https://shopify.dev/docs/api/storefront/unstable/mutations/customerAccessTokenCreateWithMultipass) mutation Creates a [`CustomerAccessToken`](https://shopify.dev/docs/api/storefront/unstable/objects/CustomerAccessToken) using a [multipass token](https://shopify.dev/docs/api/multipass) instead of email and password. This enables single sign-on for customers who authenticate through an external system. If the customer doesn't exist in Shopify, then a new customer record is created automatically. If the customer exists but the record is disabled, then the customer record is re-enabled. *** **Caution:** Multipass tokens are only valid for 15 minutes and can only be used once. Generate tokens on-the-fly when needed rather than in advance. *** * multipass​Token [String!](https://shopify.dev/docs/api/storefront/unstable/scalars/String) required ### Arguments A valid [multipass token](https://shopify.dev/api/multipass) to be authenticated. *** * [customer​Activate](https://shopify.dev/docs/api/storefront/unstable/mutations/customerActivate) mutation Activates a customer account using an activation token received from the [`customerCreate`](https://shopify.dev/docs/api/storefront/unstable/mutations/customerCreate) mutation. The customer sets their password during activation and receives a [`CustomerAccessToken`](https://shopify.dev/docs/api/storefront/unstable/objects/CustomerAccessToken) for authenticated access. For a simpler approach that doesn't require parsing the activation URL, use [`customerActivateByUrl`](https://shopify.dev/docs/api/storefront/unstable/mutations/customerActivateByUrl) instead. *** **Caution:** This mutation handles customer credentials. Always use HTTPS and never log or expose the password or access token. *** * id [ID!](https://shopify.dev/docs/api/storefront/unstable/scalars/ID) required ### Arguments Specifies the customer to activate. * input [Customer​Activate​Input!](https://shopify.dev/docs/api/storefront/unstable/input-objects/CustomerActivateInput) required The fields used to activate a customer. *** * [customer​Activate​By​Url](https://shopify.dev/docs/api/storefront/unstable/mutations/customerActivateByUrl) mutation Activates a customer account using the full activation URL from the [`customerCreate`](https://shopify.dev/docs/api/storefront/unstable/mutations/customerCreate) mutation. This approach simplifies activation by accepting the complete URL directly, eliminating the need to parse it for the customer ID and activation token. Returns a [`CustomerAccessToken`](https://shopify.dev/docs/api/storefront/unstable/objects/CustomerAccessToken) for authenticating subsequent requests. *** **Caution:** Store the returned access token securely. It grants access to the customer\'s account data. *** * activation​Url [URL!](https://shopify.dev/docs/api/storefront/unstable/scalars/URL) required ### Arguments The customer activation URL. * password [String!](https://shopify.dev/docs/api/storefront/unstable/scalars/String) required A new password set during activation. *** * [customer​Address​Create](https://shopify.dev/docs/api/storefront/unstable/mutations/customerAddressCreate) mutation Creates a new [`MailingAddress`](https://shopify.dev/docs/api/storefront/unstable/objects/MailingAddress) for a [`Customer`](https://shopify.dev/docs/api/storefront/unstable/objects/Customer). Use the customer's [access token](https://shopify.dev/docs/api/storefront/unstable/mutations/customerAddressCreate#arguments-customerAccessToken) to identify them. Successful creation returns the new address. Each customer can have multiple addresses. * customer​Access​Token [String!](https://shopify.dev/docs/api/storefront/unstable/scalars/String) required ### Arguments The access token used to identify the customer. * address [Mailing​Address​Input!](https://shopify.dev/docs/api/storefront/unstable/input-objects/MailingAddressInput) required The customer mailing address to create. *** * [customer​Address​Delete](https://shopify.dev/docs/api/storefront/unstable/mutations/customerAddressDelete) mutation Permanently deletes a specific [`MailingAddress`](https://shopify.dev/docs/api/storefront/unstable/objects/MailingAddress) for a [`Customer`](https://shopify.dev/docs/api/storefront/unstable/objects/Customer). Requires a valid [customer access token](https://shopify.dev/docs/api/storefront/unstable/mutations/customerAddressDelete#arguments-customerAccessToken) to authenticate the request. *** **Caution:** This action is irreversible. You can\'t recover the deleted address. *** * id [ID!](https://shopify.dev/docs/api/storefront/unstable/scalars/ID) required ### Arguments Specifies the address to delete. * customer​Access​Token [String!](https://shopify.dev/docs/api/storefront/unstable/scalars/String) required The access token used to identify the customer. *** * [customer​Address​Update](https://shopify.dev/docs/api/storefront/unstable/mutations/customerAddressUpdate) mutation Updates an existing [`MailingAddress`](https://shopify.dev/docs/api/storefront/unstable/objects/MailingAddress) for a [`Customer`](https://shopify.dev/docs/api/storefront/unstable/objects/Customer). Requires a [customer access token](https://shopify.dev/docs/api/storefront/unstable/mutations/customerAddressUpdate#arguments-customerAccessToken) to identify the customer, an ID to specify which address to modify, and an [`address`](https://shopify.dev/docs/api/storefront/unstable/input-objects/MailingAddressInput) with the updated fields. Successful update returns the updated [`MailingAddress`](https://shopify.dev/docs/api/storefront/unstable/objects/MailingAddress). * customer​Access​Token [String!](https://shopify.dev/docs/api/storefront/unstable/scalars/String) required ### Arguments The access token used to identify the customer. * id [ID!](https://shopify.dev/docs/api/storefront/unstable/scalars/ID) required Specifies the customer address to update. * address [Mailing​Address​Input!](https://shopify.dev/docs/api/storefront/unstable/input-objects/MailingAddressInput) required The customer’s mailing address. *** * [customer​Create](https://shopify.dev/docs/api/storefront/unstable/mutations/customerCreate) mutation Creates a new [`Customer`](https://shopify.dev/docs/api/storefront/unstable/objects/Customer) account with the provided contact information and login credentials. The customer can then sign in for things such as accessing their account, viewing order history, and managing saved addresses. *** **Caution:** This mutation creates customer credentials. Ensure passwords are collected securely and never logged or exposed in client-side code. *** * input [Customer​Create​Input!](https://shopify.dev/docs/api/storefront/unstable/input-objects/CustomerCreateInput) required ### Arguments The fields used to create a new customer. *** * [customer​Default​Address​Update](https://shopify.dev/docs/api/storefront/unstable/mutations/customerDefaultAddressUpdate) mutation Updates the default address of an existing [`Customer`](https://shopify.dev/docs/api/storefront/unstable/objects/Customer). Requires a [customer access token](https://shopify.dev/docs/api/storefront/unstable/mutations/customerDefaultAddressUpdate#arguments-customerAccessToken) to identify the customer and an address ID to specify which address to set as the new default. * customer​Access​Token [String!](https://shopify.dev/docs/api/storefront/unstable/scalars/String) required ### Arguments The access token used to identify the customer. * address​Id [ID!](https://shopify.dev/docs/api/storefront/unstable/scalars/ID) required ID of the address to set as the new default for the customer. *** * [customer​Email​Marketing​Subscribe](https://shopify.dev/docs/api/storefront/unstable/mutations/customerEmailMarketingSubscribe) mutation Subscribes a customer to the newsletter with an email address. * email [String!](https://shopify.dev/docs/api/storefront/unstable/scalars/String) required ### Arguments The customer's email address. *** * [customer​Recover](https://shopify.dev/docs/api/storefront/unstable/mutations/customerRecover) mutation Sends a reset password email to the customer. The email contains a reset password URL and token that you can pass to the [`customerResetByUrl`](https://shopify.dev/docs/api/storefront/unstable/mutations/customerResetByUrl) or [`customerReset`](https://shopify.dev/docs/api/storefront/unstable/mutations/customerReset) mutation to reset the customer's password. This mutation is throttled by IP. With private access, you can provide a [`Shopify-Storefront-Buyer-IP` header](https://shopify.dev/docs/api/usage/authentication#optional-ip-header) instead of the request IP. The header is case-sensitive. *** **Caution:** Ensure the value provided to \\Shopify-Storefront-Buyer-I\P\\ is trusted. Unthrottled access to this mutation presents a security risk. *** * email [String!](https://shopify.dev/docs/api/storefront/unstable/scalars/String) required ### Arguments The email address of the customer to recover. *** * [customer​Reset](https://shopify.dev/docs/api/storefront/unstable/mutations/customerReset) mutation Resets a customer's password using the reset token from a password recovery email. On success, returns the updated [`Customer`](https://shopify.dev/docs/api/storefront/unstable/objects/Customer) and a new [`CustomerAccessToken`](https://shopify.dev/docs/api/storefront/unstable/objects/CustomerAccessToken) for immediate authentication. Use the [`customerRecover`](https://shopify.dev/docs/api/storefront/unstable/mutations/customerRecover) mutation to send the password recovery email that provides the reset token. Alternatively, use [`customerResetByUrl`](https://shopify.dev/docs/api/storefront/unstable/mutations/customerResetByUrl) if you have the full reset URL instead of the customer ID and token. *** **Caution:** This mutation handles sensitive customer credentials. Validate password requirements on the client before submission. *** * id [ID!](https://shopify.dev/docs/api/storefront/unstable/scalars/ID) required ### Arguments Specifies the customer to reset. * input [Customer​Reset​Input!](https://shopify.dev/docs/api/storefront/unstable/input-objects/CustomerResetInput) required The fields used to reset a customer’s password. *** * [customer​Reset​By​Url](https://shopify.dev/docs/api/storefront/unstable/mutations/customerResetByUrl) mutation Resets a customer's password using the reset URL from a password recovery email. The reset URL is generated by the [`customerRecover`](https://shopify.dev/docs/api/storefront/unstable/mutations/customerRecover) mutation. On success, returns the updated [`Customer`](https://shopify.dev/docs/api/storefront/unstable/objects/Customer) and a new [`CustomerAccessToken`](https://shopify.dev/docs/api/storefront/unstable/objects/CustomerAccessToken) for immediate authentication. *** **Caution:** This mutation handles customer credentials. Ensure the new password is transmitted securely and never logged or exposed in client-side code. *** * reset​Url [URL!](https://shopify.dev/docs/api/storefront/unstable/scalars/URL) required ### Arguments The customer's reset password url. * password [String!](https://shopify.dev/docs/api/storefront/unstable/scalars/String) required New password that will be set as part of the reset password process. *** * [customer​Sms​Marketing​Subscribe](https://shopify.dev/docs/api/storefront/unstable/mutations/customerSmsMarketingSubscribe) mutation Subscribes a customer to the newsletter with a phone number. * phone​Number [String!](https://shopify.dev/docs/api/storefront/unstable/scalars/String) required ### Arguments The customer's phone number. *** * [customer​Update](https://shopify.dev/docs/api/storefront/unstable/mutations/customerUpdate) mutation Updates a [customer's](https://shopify.dev/docs/api/storefront/unstable/objects/Customer) personal information such as name, password, and marketing preferences. Requires a valid [`CustomerAccessToken`](https://shopify.dev/docs/api/storefront/unstable/objects/CustomerAccessToken) to authenticate the customer making the update. If the customer's password is updated, then all previous access tokens become invalid. The mutation returns a new access token in the payload to maintain the customer's session. *** **Caution:** Password changes invalidate all existing access tokens. Ensure your app handles the new token returned in the response to avoid logging the customer out. *** * customer​Access​Token [String!](https://shopify.dev/docs/api/storefront/unstable/scalars/String) required ### Arguments The access token used to identify the customer. * customer [Customer​Update​Input!](https://shopify.dev/docs/api/storefront/unstable/input-objects/CustomerUpdateInput) required The customer object input. *** *** ## CustomerUserError Mutations ### Mutated by * [customer​Access​Token​Create](https://shopify.dev/docs/api/storefront/unstable/mutations/customerAccessTokenCreate) * [customer​Access​Token​Create​With​Multipass](https://shopify.dev/docs/api/storefront/unstable/mutations/customerAccessTokenCreateWithMultipass) * [customer​Activate](https://shopify.dev/docs/api/storefront/unstable/mutations/customerActivate) * [customer​Activate​By​Url](https://shopify.dev/docs/api/storefront/unstable/mutations/customerActivateByUrl) * [customer​Address​Create](https://shopify.dev/docs/api/storefront/unstable/mutations/customerAddressCreate) * [customer​Address​Delete](https://shopify.dev/docs/api/storefront/unstable/mutations/customerAddressDelete) * [customer​Address​Update](https://shopify.dev/docs/api/storefront/unstable/mutations/customerAddressUpdate) * [customer​Create](https://shopify.dev/docs/api/storefront/unstable/mutations/customerCreate) * [customer​Default​Address​Update](https://shopify.dev/docs/api/storefront/unstable/mutations/customerDefaultAddressUpdate) * [customer​Email​Marketing​Subscribe](https://shopify.dev/docs/api/storefront/unstable/mutations/customerEmailMarketingSubscribe) * [customer​Recover](https://shopify.dev/docs/api/storefront/unstable/mutations/customerRecover) * [customer​Reset](https://shopify.dev/docs/api/storefront/unstable/mutations/customerReset) * [customer​Reset​By​Url](https://shopify.dev/docs/api/storefront/unstable/mutations/customerResetByUrl) * [customer​Sms​Marketing​Subscribe](https://shopify.dev/docs/api/storefront/unstable/mutations/customerSmsMarketingSubscribe) * [customer​Update](https://shopify.dev/docs/api/storefront/unstable/mutations/customerUpdate) *** ## Interfaces * [Displayable​Error](https://shopify.dev/docs/api/storefront/unstable/interfaces/DisplayableError) interface *** ## CustomerUserError Implements ### Implements * [Displayable​Error](https://shopify.dev/docs/api/storefront/unstable/interfaces/DisplayableError)