PUT/admins/{username}

Update an administrator

Updates an existing administrator account identified by its username. Use this operation to change administrator details and settings, but use the dedicated APIs for recovery codes and TOTP configuration; you cannot update the administrator impersonated by an API key.

1 parameter · 14 body fields
usernamestringrequired
The username of the administrator to update.

Administrator details and settings to update.

additional_infostringoptional
Free form text field
created_atintegeroptional
creation time as unix timestamp in milliseconds. It will be 0 for admins created before v2.2.0
descriptionstringoptional
optional description, for example the admin full name
emailstringoptional
The administrator's email address.
filtersobjectoptional
Administrator options, including authentication settings, allowed IP ranges, and preferences. Recovery codes and TOTP configuration cannot be set or updated through this API.
groupsarray<object>optional
Groups automatically selected for new users created by this admin. The admin will still be able to choose different groups. These settings are only used for this admin UI and they will be ignored in REST API/hooks.
idintegeroptional
The administrator's numeric identifier. Must be at least 1.
last_loginintegeroptional
Last user login as unix timestamp in milliseconds. It is saved at most once every 10 minutes
passwordstringoptional
Admin password. For security reasons this field is omitted when you search/get admins
permissionsarray<string>optional
The administrator's permission identifiers; `*` grants super-administrator permissions.
rolestringoptional
Role name. The admin administers the users carrying the same role, and holds any permission except `*`. Where the role isolates its resources, the groups and the folders carrying it are the ones the admin reads, and the server applies the role to the resources it creates
statusintegeroptional
status: * `0` user is disabled, login is not allowed * `1` user is enabled
Allowed:01
updated_atintegeroptional
last update time as unix timestamp in milliseconds
usernamestringoptional
username is unique

7 status codes
200Returns an object containing an `error` description, if any, and a `message`, which can be empty.
errorstringoptional
error description if any
messagestringoptional
message, can be empty
400Returned when the request is invalid.
errorstringoptional
error description if any
messagestringoptional
message, can be empty
401Returned when authentication is missing or invalid.
errorstringoptional
error description if any
messagestringoptional
message, can be empty
403Returned when the authenticated user is not permitted to update the administrator.
errorstringoptional
error description if any
messagestringoptional
message, can be empty
404Returned when the specified administrator cannot be found.
errorstringoptional
error description if any
messagestringoptional
message, can be empty
500Returned when an internal server error occurs.
errorstringoptional
error description if any
messagestringoptional
message, can be empty
defaultUnexpected Error
errorstringoptional
error description if any
messagestringoptional
message, can be empty

Error handling

A 400 is returned for an invalid request. A 401 indicates that authentication is missing or invalid, and a 403 indicates that the authenticated user is not permitted to update the administrator. A 404 is returned when the administrator cannot be found, and a 500 indicates a server error. The username path parameter must identify the administrator to update; recovery codes and TOTP configuration cannot be set or updated here, and you cannot update the administrator impersonated by an API key.