# Change the password of a User

`POST /lokta-lms/api/v1/users/{userId}/pwd`

When updating a password you must provide the repeatPassword parameter also.

## Parameters
- `userId` (path, integer, required): userId

## Request body (application/json)
- `password` (string)
- `repeatPassword` (string)

## Responses
- `200`: OK

## Response fields
- `changes` (ChangePwdUsersUserIdResponseChanges)
- `officeId` (integer)
- `resourceId` (integer)

## Example request (cURL)
```bash
curl -X POST \
  'http://localhost:8080/lokta-lms/api/v1/users/{userId}/pwd' \
  -u '{username}:{password}' \
  -H 'Tenant-Identifier: default' \
  -H 'Content-Type: application/json' \
  -d '{
  "password": "password",
  "repeatPassword": "repeatPassword"
}'
```

## Example response
```json
{
  "changes": {
    "password": true
  },
  "officeId": 1,
  "resourceId": 11
}
```

Interactive: https://developer.lokta.ai/reference.html#operation/changePasswordUser
