Change password
The endpoint provides functionality to change the user's password.
HTTP request
POST https://$instanceId.id.nevis.cloud/nevis/api/v1/users/$userId/password/change
Parameters
Parameter | In | Type | Required / Optional | Description |
---|---|---|---|---|
instanceId | path | string | required | The ID of your Identity Cloud instance |
userId | path | string | required | The ID of the user |
Request body
You can change the password by only providing the new password value.
Parameter | Type | Required / Optional | Description |
---|---|---|---|
newPassword | string | required | The new password of the user |
Example request
Adjust the user ID in the following snippet and type a new password value to be set in the variable newPassword
userId=your-user-id-123 \
read -s newPassword
curl --request POST "https://$instanceId.id.nevis.cloud/nevis/api/v1/users/$userId/password/change" \
--header "Content-Type: application/json" \
--header "Authorization: Bearer $accessKey" \
--data "{ \"newPassword\" : \"$newPassword\" }"
HTTP response
On success
HTTP/1.1 204
is returned if the password is successfully changed.
On failure
HTTP/1.1 401
is returned if the authorization fails due to an invalid access key.
HTTP/1.1 422
is returned if invalid request content is given.
HTTP/1.1 500
is returned if an unexpected error occurs.