Forgot Password
POST
/api/auth/forgot-password
const url = 'https://example.com/api/auth/forgot-password';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"email":"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://example.com/api/auth/forgot-password \ --header 'Content-Type: application/json' \ --data '{ "email": "example" }'Request a password reset email.
Always returns 200 with {"sent": true} to avoid leaking whether the
email address exists or has password credentials.
Request Body required
Section titled “Request Body required ” Media type application/json
ForgotPasswordBody
object
email
required
Email
string
Example generated
{ "email": "example"}Responses
Section titled “ Responses ”Successful Response
Media type application/json
SentResponse
{"sent": True} confirmation. Used by forgot-password / set-password
flows that always succeed from the client’s perspective.
object
sent
required
Sent
boolean
Example generated
{ "sent": true}Validation Error
Media type application/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationErrorobject
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
input
Input
ctx
Context
object
Example generated
{ "detail": [ { "loc": [ "example" ], "msg": "example", "type": "example", "input": "example", "ctx": {} } ]}