--- title: "Send Reset Password Code" description: "Send a code to the user's email address for resetting the password." api: "POST /api/v1/auth/password/send-reset-code" --- ## Request ### Headers The unique identifier of the project. The publishable client key. ### Body The email address of the user requesting a password reset. The base callback URL to construct the reset link from. A query parameter `code` with the reset code will be appended to it. ## Response Indicates the reset code was sent successfully. ```bash cURL curl -X POST "https://api.stack-auth.com/api/v1/auth/password/send-reset-code" \ -H "Content-Type: application/json" \ -H "X-Stack-Project-Id: " \ -H "X-Stack-Publishable-Client-Key: " \ -d '{ "email": "johndoe@example.com", "callback_url": "https://example.com/handler/password-reset" }' ``` ```javascript JavaScript const response = await fetch("https://api.stack-auth.com/api/v1/auth/password/send-reset-code", { method: "POST", headers: { "Content-Type": "application/json", "X-Stack-Project-Id": "", "X-Stack-Publishable-Client-Key": "" }, body: JSON.stringify({ email: "johndoe@example.com", callback_url: "https://example.com/handler/password-reset" }) }); const data = await response.json(); ```