# Update a User

This endpoint updates the name, the Role of the User, and the description of the User.

Method Path Operation*
PATCH /users/{user} update_user

*

In order for a User to perform the "update_user" operation, the "update_user" permission must be included in the list of allowed actions in the statement of the User's Role.

# Request

Parameter Type In Description
{user}
required
string path User UUID.
name
optional *
string body Name of the User. It must match the regular expression (opens new window) [0-9A-Za-z][0-9A-Za-z_ \-]{0,30}[0-9A-Za-z]. It does not need to be unique in the context of the Account.
role
optional *
string body Role UUID.
description
optional **
dictionary body Attributes of the User in form of key-value pairs:
- key: It must match the regular expression (opens new window) [a-z_][0-9a-z_]{0,63}.
- value: JSON compliant value.
For more details consult the description field section.

*

Any optional parameters not provided in the request will be left unchanged. Any optional parameters provided in the request will replace current parameters. Please note that if "description" is provided in the request body, the entire description will be updated.

**

If the "description" field with attributes is provided in the request body, the "description" field from the request body will replace the current "description" field.
If no attributes are provided in the request body of "description" ("description": {}), all attributes from the current "description" will be removed. The response will return an empty dictionary ("description": {}).

If "description" with the value null is provided in the request body, all attributes from the current "description" will be removed. The response will not return the "description" field.
If the request body does not contain "description", no changes will be made to the "description" field.

In our example, we change the values of two attributes in the "description" field:

# Response

Attribute Type Description
uuid string User UUID.
name string Name of the User. It must match the regular expression (opens new window) [0-9A-Za-z][0-9A-Za-z_ \-]{0,30}[0-9A-Za-z]. It does not need to be unique in the context of the Account.
account string Account UUID.
role string Role UUID.
description dictionary Attributes of the User in form of key-value pairs:
- key: It must match the regular expression (opens new window) [a-z_][0-9a-z_]{0,63}.
- value: JSON compliant value.
For more details consult the description field section.
created_ts timestamp Time at which the User was created. Measured in seconds (to three decimal places) that have elapsed since the Unix epoch (opens new window).
updated_ts timestamp Time at which the User was las updated. Measured in seconds (to three decimal places) that have elapsed since the Unix epoch (opens new window).

# Status codes

Requests to this endpoint result in generic status codes. For a comprehensive list of status codes, please consult the Status Codes section.