/gate/password-reset/requestRequest Password Reset
Initiates a password reset flow for the specified email address by dispatching a single-use reset token.
The reset token has a 1-hour TTL.
| projectSlug * | path | The project's slug: the path segment after It is unique within the org. |
| email * | string <email> | The address to send the reset code to. The response is the same whether or not an active end user has this address; a code is only emailed when one does. |
| HTTP | K9O Code | Description |
|---|---|---|
| 200 | Success | |
| 404 | K9O_END_USER_NOT_FOUND | No account was found for the provided email address. |
| data * | object | The result of the reset request. If the address belongs to an end user of the project, a reset code is emailed to it. |
| reset * | object | The reset request was accepted. The answer is the same for every address. |
| requested * | true | Always |
| expiresAt * | string <date-time> | When the reset code expires, one hour from now. Present for every address, registered or not. |
| debugToken | string | The reset code itself. Only in a test deployment that turns this on; a production deployment never includes it. |
| meta * | any | Request metadata: cost, timing and the request and trace ids. |
// const k9o = new K9o({ orgSlug: 'playground', projectSlug: 'storefront', apiKey: 'k9o_…' })
const { data } = await k9o.gate.passwordReset.request({
email: '[email protected]'
})Showing example in TypeScript
{
"email": "[email protected]"
}{
"data": {
"reset": {
"requested": true,
"expiresAt": "string"
},
"debugToken": "string"
}
}