---
title: "Change a User's Password"
method: POST
path: "/users/{user_id}/settings/password/"
tags: ["Users"]
---

# Change a User's Password

`POST /users/{user_id}/settings/password/`

Change the password for the specified user.
Only the current authenticated user can change their own password using this endpoint.
#### Returns
Returns a `204 No Content` response if the password change was successful.
#### Errors
If the request is unsuccessful, an `errors` key containing information about the failure will be returned. Refer to the [list of error codes](#tag/Errors-and-Error-Codes) to understand why this request may have failed.
Some common error cases: - `400 Bad Request`: Invalid or missing password fields. - `403 Forbidden`: You are not authorized to change this user's password. - `429 Too Many Requests`: Too many failed attempts; try again later.

## Path parameters

- `user_id` string, required

## Request body

- object
  - `data` object, required
    - `type` 'user_passwords'
    - `attributes` object
      - `existing_password` string — The user's current password.
      - `new_password` string — The new password to set for the user.

## Response `204`

Password successfully changed.
All sessions for the user will be logged out and must be re-authenticated.

## Other responses

- `400` — Bad request. The existing password is incorrect, or the new password is invalid.
- `403` — Permission denied. You do not have permission to change this user's password.
- `429` — Too many failed attempts. Please wait before trying again.

---

[API](https://skmtc.net/osf/apis/osf-apiv2-documentation.md) · [All operations](https://skmtc.net/osf/apis/osf-apiv2-documentation/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/osf/osf-apiv2-documentation/versions/ca701048eb0d/schema)
