Change Password
POST
/api/auth/password/change
const url = 'https://example.com/api/auth/password/change';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', '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/api/auth/password/change \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "current_password": "example", "new_password": "example" }'Change password for current user.
Rate limited (per IP + per user) and, for an MFA-enrolled user, gated on a
recent MFA assertion (require_recent_mfa: a TOTP/backup-code login or
enrolment within the freshness window, enforced when SHELL_MFA_ENFORCE
is on). Re-login with MFA is the step-up path.
Authorizations
Section titled “ Authorizations ”Request Bodyrequired
Section titled “ Request Bodyrequired ” Media type application/json
PasswordChangeRequest
Password change request (for authenticated users)
object
current_password
required
Current Password
string
new_password
required
New Password
string
Example generated
{ "current_password": "example", "new_password": "example"}Responses
Section titled “ Responses ”Successful Response
Media type application/json
Example generated
exampleValidation Error
Media type application/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationError object
ctx
Context
object
input
Input
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
Example generated
{ "detail": [ { "ctx": {}, "input": "example", "loc": [ "example" ], "msg": "example", "type": "example" } ]}