2002: Change password

Updates password of an entity after first having verified that the old password is correct and matches entity


Endpoint ID:2002
Method:PUT
URL:

/entity/id/{entity-id}/password

/entity/ext-key/{ext-key}/{ext-type}/password



entity-id

Rubiq entity ID that uniquely identifies an account to change password for


ext-key

External key that uniquely identifies an account to change password for


ext-typeType of external key
Request body:JSON data with login ID and both old and new password

Required fields: loginID, oldPassword, newPassword

Example
{
	"loginID": "mailbox@mailserver.com",
	"oldPassword": "secretABC",
	"newPassword": "secret123"
}


Response body:

 None 
Status codes:204

Password was updated with success


400

Request is valid but data validation failed because the new password doesn’t comply with the required rules


403

Old password doesn’t match the password stored in the database

The following sub codes may be returned:

403.1Unknown loginID
403.3User is not active
403.4Incorrect password
403.5loginID/password do not match this entity
403.10Too many incorrect attempts to log in - the password is temporarily locked
403.11The password has expired



404

Account was not found

The following sub codes may be returned:

404.1User not found
404.2External user could not be found

412

App has no permission to change password