Reset Password
POST
/auth/reset-password
const url = 'https://example.com/auth/reset-password';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"password":"example","token":"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/auth/reset-password \ --header 'Content-Type: application/json' \ --data '{ "password": "example", "token": "example" }'Consume a reset token and set a new password. Invalidates all of the user’s sessions so a reset (e.g. after a compromise) ends any active ones.
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
ResetPasswordRequest
object
password
required
Password
string
token
required
Token
string
Examplegenerated
{ "password": "example", "token": "example"}Responses
Section titled “Responses”Successful Response
Validation Error
Media typeapplication/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationErrorobject
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
Examplegenerated
{ "detail": [ { "loc": [ "example" ], "msg": "example", "type": "example" } ]}