Change Password
POST
/auth/change-password
const url = 'https://example.com/auth/change-password';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"current_password":"example","new_password":"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/change-password \ --header 'Content-Type: application/json' \ --data '{ "current_password": "example", "new_password": "example" }'Authenticated password change. Verifies the current password, then sets the new one.
Unlike the reset flow this keeps existing sessions valid — the user just authenticated by supplying their current password, so there’s no need to sign them out everywhere.
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
ChangePasswordRequest
Authenticated password change — verifies the current password before setting a new one.
object
current_password
required
Current Password
string
new_password
required
New Password
string
Examplegenerated
{ "current_password": "example", "new_password": "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" } ]}