Sends a password reset email if an account exists for the given email address. Always returns 202 Accepted to prevent email enumeration.
JavaScript
import { createClient } from '@spree/sdk' const client = createClient({ baseUrl: 'https://your-store.com', publishableKey: '<api-key>', }) await client.passwordResets.create({ email: 'customer@example.com', redirect_url: 'https://myshop.com/reset-password', })
{ "message": "If an account exists for that email, password reset instructions have been sent." }
Publishable API key for store access
Email address of the account to reset
"customer@example.com"
URL to redirect the user to after clicking the reset link. Validated against the store's allowed origins.
"https://myshop.com/reset-password"
email not found (same response to prevent enumeration)
Was this page helpful?