MageSmith
MutationCustomer · Magento 2.4.9

resetPassword

resetPassword is a Magento 2 GraphQL mutation in the Customer module. Reset a customer's password using the reset password token that the customer received in an email after requesting it using requestPasswordResetEmail. It returns Boolean and requires an Authorization header (Bearer customer token).

Last verified: against Magento 2.4.9.

Returns

Boolean

Resolver class

\Magento\CustomerGraphQl\Model\Resolver\ResetPassword

Arguments

email String! Required

The customer's email address.

resetPasswordToken String! Required

A runtime token generated by the `requestPasswordResetEmail` mutation.

newPassword String! Required

The customer's new password.

Example request

Auto-generated from the SDL — paste-ready against your store's /graphql endpoint. Replace the host, store code, and any required values before running.

Headers

Content-Type
application/json
Store
default store view code; use 'default' for the single-store baseline
Authorization
Bearer <CUSTOMER_TOKEN> obtain from generateCustomerToken mutation

Query

mutation ($email: String!, $resetPasswordToken: String!, $newPassword: String!) {
  resetPassword(email: $email, resetPasswordToken: $resetPasswordToken, newPassword: $newPassword)
}

Variables

{
  "email": "",
  "newPassword": "",
  "resetPasswordToken": ""
}

Every Magento dev tool, in one hosted workspace.

Free to sign up. Nothing to install. Drafts, audits, and projects saved across every tool.