Request password reset
POST
/api/website/customers/password/forgot
const url = 'https://api.petanqueai.com/api/website/customers/password/forgot';const options = { method: 'POST', headers: { 'x-storefront-token': '<x-storefront-token>', 'Content-Type': 'application/json' }, body: '{"email":"hello@example.com","resetUrl":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.petanqueai.com/api/website/customers/password/forgot \ --header 'Content-Type: application/json' \ --header 'x-storefront-token: <x-storefront-token>' \ --data '{ "email": "hello@example.com", "resetUrl": "example" }'Emails a reset link if the address has an account. It always answers 202 so it cannot be used to find out which addresses are registered.
resetUrl is the page on your site that receives the link (?token=… is appended); its origin must be on your allowed origins. The link is valid for 1 hour.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”object
email
required
string format: email
resetUrl
required
string
Example generated
{ "email": "hello@example.com", "resetUrl": "example"}object
email
required
string format: email
resetUrl
required
string
Example generated
email=hello%40example.com&resetUrl=exampleobject
email
required
string format: email
resetUrl
required
string