# Update a User Secret

This endpoint updates the "validity_ts" the User Secret of a given User.

Method Path Operation*
PATCH /users/{user}/secrets/ update_user_secret

*

In order for a User to perform the "update_user_secret" operation, the permission "update_user_secret" 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 of the User for whom the User Secret was created.
validity_ts
optional *
timestamp body Time at which the User Secret expires. Measured in seconds (to three decimal places) that have elapsed since the Unix epoch (opens new window). If the value is null, the User Secret does not expire.

*

If you do not include the "validity_ts" parameter in the request body or if you set the value to null, the User Secret will not expire.

In our example, we want to change the "validity_ts" of the User Secret, so that the User Secret does not expire ("validity_ts": null).

# Response

Attribute Type Description
fingerprint string 4 last characters of the User Secret.
account string Account UUID.
user string User UUID of the User for whom the User Secret was created.
validity_ts timestamp Time at which the User Secret expires. Measured in seconds (to three decimal places) that have elapsed since the Unix epoch (opens new window). If the value is null, the User Secret does not expire.
created_ts timestamp Time at which the User Secret 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 Secret was last 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.