Skip to content

Change Password

POST
/api/auth/password/change
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.

Media type application/json
PasswordChangeRequest

Password change request (for authenticated users)

object
current_password
required
Current Password
string
new_password
required
New Password
string
>= 8 characters <= 128 characters
Example generated
{
"current_password": "example",
"new_password": "example"
}

Successful Response

Media type application/json
Example generated
example

Validation 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"
}
]
}