Skip to content

Change my password

PUT
/account/password

Changes the password you sign in with. Send your current password and a new one; the session you’re using stays signed in.

The new password has to pass this instance’s password policy, which can require a minimum length, an upper-case letter, a digit, a symbol, or not being one of a short list of very common passwords; none of these is on unless the operator turns it on, and none is applied if the policy can’t be read. Length is counted in bytes. The new password also can’t be your current one or one of the last five recorded in your password history, which may not include every earlier password.

Set revoke_other_sessions to true to also try to sign out your other sessions. That only happens when this request uses a session cookie: with an API token, or when the field is left out, no session is ended. If signing them out fails, the password is still changed and sessions_revoked is 0. API tokens are never revoked here.

A wrong current password, a password the policy rejects, or a reused one gets a 400 that says which. So does an account with no password of its own. A 500 doesn’t always mean nothing changed: the new password can already be saved. The change is recorded in the audit log as user.password_changed on a best-effort basis.

object
current_password
required

Your current password.

string
new_password
required

The new password. It’s checked against the password policy when one is set and can be read, and against your current and recently recorded passwords.

string
revoke_other_sessions

Set to true to try to end your other sessions; if that fails, the password still changes. Leaving it out, or false, ends none. It only has an effect when this request uses a session cookie.

boolean

Password changed.

object
changed_at
required
string format: date-time
sessions_revoked

How many of your other sessions were ended. It’s 0 when you didn’t ask, when the request used an API token, or when ending them failed, and it can include sessions that had already expired.

integer

Malformed request

object
error
required

Human-readable error summary

string
Example
the request could not be completed

Authentication required, missing, or invalid

object
error
required

Human-readable error summary

string
Example
the request could not be completed
Example
{
"error": "authentication required: sign in and retry with a valid session or API token"
}

Unexpected server error

object
error
required

Human-readable error summary

string
Example
the request could not be completed