Medusa
Store APIAdmin API
Store APIAdmin API
Discord
Twitter
Linkedin
Github
  1. Auth
  • Introduction
  • Authentication
  • HTTP Compression
  • Publishable API Key
  • Expanding Fields
  • Selecting Fields
  • Query Parameter Types
  • Pagination
  • Currencies
    • List Currencies
      GET
    • Get a Currency
      GET
  • Payment Providers
    • List Payment Providers
      GET
  • Return Reasons
    • List Return Reasons
      GET
    • Get a Return Reason
      GET
  • Auth
    • Retrieve Registration JWT Token
      POST
    • Authenticate Customer
      POST
    • Generate Reset Password Token for Customer
      POST
    • Refresh Authentication Token
      POST
    • Validate Authentication Callback
      POST
    • Delete Authentication Session
      DELETE
    • Set Authentication Session
      POST
    • Reset a Customer's Password
      POST
  • Collections
    • List Collections
      GET
    • Get a Collection
      GET
  • Regions
    • List Regions
      GET
    • Get a Region
      GET
  • Products
    • List Products
    • Get a Product
  • Customers
    • Get Logged-in Customer
    • Update Customer
    • Create Address for Logged-In Customer
    • List Customer's Addresses
    • Get Customer's Address
    • Update Customer's Address
    • Remove Customer's Address
    • Register Customer
  • Product Tags
    • List Product Tags
    • Get a Product Tag
  • Returns
    • Create Return
  • Product Types
    • Get a Product Type
    • List Product Types
  • Product Categories
    • List Product Categories
    • Get a Product Category
  • Carts
    • Create Cart
    • Set Cart's Customer
    • Add Shipping Method to Cart
    • Add Line Item to Cart
    • Calculate Cart Taxes
    • Get a Cart
    • Update a Cart
    • Update a Line Item in a Cart
    • Remove Line Item from Cart
    • Complete Cart
    • Add Promotions to Cart
    • Remove Promotions from Cart
  • Orders
    • List Logged-in Customer's Orders
    • Request Order Transfer
    • Get an Order
    • Cancel Order Transfer
    • Decline Order Transfer
    • Accept Order Transfer
  • Payment Collections
    • Initialize Payment Session of a Payment Collection
    • Create Payment Collection
  • Shipping Options
    • Calculate Shipping Option Price
    • List Shipping Options for Cart
  1. Auth

Generate Reset Password Token for Customer

POST
/auth/customer/{auth_provider}/reset-password
Auth
Generate a reset password token for a customer. This API route doesn't reset the customer password or send them the reset instructions in a notification.
Instead, This API route emits the auth.password_reset event, passing it the token as a payload. You can listen to that event in a subscriber as explained in this guide, then send the customer a notification. The notification is sent using a Notification Module Provider, and it should have a URL that accepts a token query parameter, allowing the customer to reset their password from the storefront.
Use the generated token to update the customer's password using the Reset Password API route.
Request Request Example
JavaScript
Shell
Java
Swift
curl --location -g --request POST '{{BASE_URL}}/auth/customer//reset-password' \
--header 'Content-Type: application/json' \
--data-raw '"customer@gmail.com"'
Response Response Example
400 - Not Allowed Error
{
    "message": "Discount must be set to dynamic",
    "type": "not_allowed"
}

Request

Path Params
auth_provider
string 
required
The provider used for authentication.
Example:
emailpass
Body Params application/json
object {0}
Examples

Responses

🟢201Created
OK
This response does not have a body.
🟠400Bad Request
🟠401Unauthorized
🟠404Record Not Found
🟠409409
🟠422Parameter Error
🔴500Server Error
Modified at 2025-06-17 04:21:30
Previous
Authenticate Customer
Next
Refresh Authentication Token
Built with