---
title: "Changes the user's password"
method: PUT
path: "/users/self/password"
tags: ["Users"]
---

# Changes the user's password

`PUT /users/self/password`

## Request

- Base URL: `/v1` (relative, and the document’s source URL is not known)
- URL: `/v1/users/self/password`
- Auth: none required

Changes the user's password in Cognito

## Request body

- object
  - `type` 'NewPasswordRequired' | 'ForgottenPassword', required
  - `email` string, required
  - `password` string, required
  - `session` string: Required if type is NewPasswordRequired
  - `verification_token` string: Required if type is ForgottenPassword

## Response `202`

Password changed

- PasswordResetExpirationTime
  - `expirationTime` string: Expiration Time, UTC ISO 8601
  - `refreshTokenExpirationTime` string: Refresh Token Expiration Time, UTC ISO 8601

## Other responses

- `400`: Request rejected due to invalid parameters supplied
- `500`: Failed to process the request due to an internal error
- `501`: Requested unimplemented password change type

---

[API](https://skmtc.dev/office-of-national-statistics/apis/identity-api.md) - [All operations](https://skmtc.dev/office-of-national-statistics/apis/identity-api/llms.txt) - [OpenAPI document](https://skmtc.dev/office-of-national-statistics/apis/identity-api/revisions/6472459b6b03?raw)
