> For the complete documentation index, see [llms.txt](https://bump.sh/nethesis/doc/nethcti-middleware/llms.txt)

# Change an expired password

> POST /password/change
> 
> Public endpoint used when the login fails with `password_expired`. The current password authenticates the request on the account provider user portal. Passwords that are not expired are rejected, as this endpoint skips the 2FA verification of the login. On success all the login sessions of the user are logged out and their websockets closed; integration tokens (persistent tokens) stay valid.



## Servers
- Local development server: http://localhost:8080 (Local development server)
- Production server: https://middleware.example.com/api (Production server)



## Parameters



### Body: application/json (object)

- **username** (string)

- **current_password** (string)

- **new_password** (string)



## Responses
### 200
Password changed (message `password_changed`)

#### Body: application/json (object)
- **code** (integer)

- **message** (string)

- **data** ()

- **error** (string)


### 400
Rejected: `error_invalid_credentials`, `error_password_complexity`, `error_password_length`, `error_password_history`, `error_password_minimum_age`, `error_unknown` or malformed request


#### Body: application/json (object)
- **code** (integer)

- **message** (string)

- **data** ()

- **error** (string)


### 403
The password is not expired (`password_not_expired`)

#### Body: application/json (object)
- **code** (integer)

- **message** (string)

- **data** ()

- **error** (string)


### 503
User portal not configured or unreachable (`password_change_unavailable`)

#### Body: application/json (object)
- **code** (integer)

- **message** (string)

- **data** ()

- **error** (string)



[Powered by Bump.sh](https://bump.sh)
