{
  "schema_version": 2,
  "id": "operate/rs/references/rest-api/requests/users/password",
  "title": "User password requests",
  "url": "https://redis.io/docs/latest/operate/rs/7.4/references/rest-api/requests/users/password/",
  "summary": "User password requests",
  "content": "\n| Method                     | Path                 | Description                 |\n|----------------------------|----------------------|-----------------------------|\n| [PUT](#update-password)    | `/v1/users/password` | Change an existing password |\n| [POST](#add-password)      | `/v1/users/password` | Add a new password          |\n| [DELETE](#delete-password) | `/v1/users/password` | Delete a password           |\n\n## Update password {#update-password}\n    \n    PUT /v1/users/password\n    \nReset the password list of an internal user to include a new password.\n\n### Request {#put-request}\n\n#### Example HTTP request\n\n    PUT /v1/users/password\n\n#### Example JSON body\n\n  ```json\n  {\n      \"username\": \"johnsmith\",\n      \"old_password\": \"a password that exists in the current list\",\n      \"new_password\": \"the new (single) password\"\n  }\n  ```\n\n#### Request headers\n| Key    | Value            | Description         |\n|--------|------------------|---------------------|\n| Host   | cnm.cluster.fqdn | Domain name         |\n| Accept | application/json | Accepted media type |\n\n#### Request body\n\nThe request must contain a single JSON object with the following fields:\n\n| Field | Type | Description |\n|-------|------|-------------|\n| username     | string | Affected user (required) |\n| old_password | string | A password that exists in the current list (required) |\n| new_password | string | The new password (required) |\n\n### Response {#put-response}\n\nReturns a status code to indicate password update success or failure.\n\n### Error codes {#put-error-codes}\n\nWhen errors are reported, the server may return a JSON object with\n`error_code` and `message` fields that provide additional information.\nThe following are possible `error_code` values:\n\n| Code | Description |\n|------|-------------|\n| password_not_complex | The given password is not complex enough (Only work when the password_complexity feature is enabled). |\n| new_password_same_as_current | The given new password is identical to one of the already existing passwords. |\n\n### Status codes {#put-status-codes}\n\n| Code | Description |\n|------|-------------|\n| [200 OK](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1) | Success, password changed |\n| [400 Bad Request](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.1) | Bad or missing parameters. |\n| [401 Unauthorized](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.2) | The user is unauthorized. |\n| [404 Not Found](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.5) | Attempting to reset password to a non-existing user. |\n\n## Add password {#add-password}\n\n    POST /v1/users/password\n\nAdd a new password to an internal user's passwords list.\n\n### Request {#post-request}\n\n#### Example HTTP request\n\n    POST /v1/users/password\n\n#### Example JSON body\n\n  ```json\n  {\n      \"username\": \"johnsmith\",\n      \"old_password\": \"an existing password\",\n      \"new_password\": \"a password to add\"\n  }\n  ```\n\n#### Request headers\n| Key    | Value            | Description         |\n|--------|------------------|---------------------|\n| Host   | cnm.cluster.fqdn | Domain name         |\n| Accept | application/json | Accepted media type |\n\n#### Request body\n\nThe request must contain a single JSON object with the following fields:\n\n| Field | Type | Description |\n|-------|------|-------------|\n| username     | string | Affected user (required) |\n| old_password | string | A password that exists in the current list (required) |\n| new_password | string | The new (single) password (required) |\n\n### Response {#post-response}\n\nReturns a status code to indicate password creation success or failure. If an error occurs, the response body may include a more specific error code and message.\n\n### Error codes {#post-error-codes}\n\nWhen errors are reported, the server may return a JSON object with\n`error_code` and `message` fields that provide additional information.\nThe following are possible `error_code` values:\n\n| Code | Description |\n|------|-------------|\n| password_not_complex | The given password is not complex enough (Only work when the password_complexity feature is enabled). |\n| new_password_same_as_current | The given new password is identical to one of the already existing passwords. |\n\n### Status codes {#post-status-codes}\n\n| Code | Description |\n|------|-------------|\n| [200 OK](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1) | Success, new password was added to the list of valid passwords. |\n| [400 Bad Request](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.1) | Bad or missing parameters. |\n| [401 Unauthorized](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.2) | The user is unauthorized. |\n| [404 Not Found](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.5) | Attempting to add a password to a non-existing user. |\n\n## Delete password {#delete-password}\n    DELETE /v1/users/password\n\nDelete a password from an internal user's passwords list.\n\n### Request {#delete-request}\n\n#### Example HTTP request\n\n    DELETE /v1/users/password\n\n#### Example JSON body\n\n  ```json\n  {\n      \"username\": \"johnsmith\",\n      \"old_password\": \"an existing password\"\n  }\n  ```\n\n#### Request headers\n| Key    | Value            | Description         |\n|--------|------------------|---------------------|\n| Host   | cnm.cluster.fqdn | Domain name         |\n| Accept | application/json | Accepted media type |\n\n#### Request body\n\nThe request must contain a single JSON with the following fields:\n\n| Field | Type | Description |\n|-------|------|-------------|\n| username | string | Affected user (required) |\n| old_password | string | Existing password to be deleted (required) |\n\n### Response {#delete-response}\n\n### Error codes {#delete-error-codes}\n\nWhen errors are reported, the server may return a JSON object with\n`error_code` and `message` fields that provide additional information.\nThe following are possible `error_code` values:\n\n| Code | Description |\n|------|-------------|\n| cannot_delete_last_password | Cannot delete the last password of a user |\n\n### Status codes {#delete-status-codes}\n\n| Code | Description |\n|------|-------------|\n| [200 OK](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1) | Success, new password was deleted from the list of valid passwords. |\n| [400 Bad Request](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.1) | Bad or missing parameters. |\n| [401 Unauthorized](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.2) | The user is unauthorized. |\n| [404 Not Found](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.5) | Attempting to delete a password to a non-existing user. |\n",
  "tags": ["docs","operate","rs"],
  "last_updated": "2026-10-21T09:46:20-07:00"
}
