Updates an existing user's account settings and can disconnect the user after a successful update. Supply the user's configuration in the request body; omitting the password preserves the current password, and recovery codes and TOTP settings must be managed through their dedicated APIs. Set disconnect to 1 to require the user to log in again and apply the updated settings.
2 parameters · 39 body fields
usernamestringrequired
The username of the account to update.
disconnectintegeroptional
Controls whether the user is disconnected after a successful update: 0 keeps the existing connection and configuration until the user reconnects; 1 disconnects the user so they must log in again. Defaults to 0 when omitted.
Allowed:01
User account settings to update. The username and permissions fields are required; omitting the password preserves the current password. Recovery codes and TOTP configuration cannot be changed through this request.
additional_infostringoptional
Free form text field for external systems
created_atintegeroptional
creation time as unix timestamp in milliseconds. It will be 0 for users created before v2.2.0
descriptionstringoptional
optional description, for example the user full name
download_bandwidthintegeroptional
Maximum download bandwidth as KB/s, 0 means unlimited. Enforced as an aggregate across the user concurrent downloads on an instance: the combined download rate stays within this value regardless of the number of parallel transfers or protocols in use
download_data_transferintegeroptional
Maximum data transfer allowed for downloads as MB. 0 means no limit
emailstringoptional
The user's email address.
expiration_dateintegeroptional
expiration date as unix timestamp in milliseconds. An expired account cannot login. 0 means no expiration
filesystemobjectoptional
Storage filesystem details. The `provider` field selects which sub-config is active — all other sub-configs are ignored / cleared on save. See `FsProviders` for the mapping.
* `provider: -1` → no sub-config (None; users and groups)
* `provider: 0` → `osconfig` (local; root is the user's `home_dir`)
* `provider: 1` → `s3config`
* `provider: 2` → `gcsconfig`
* `provider: 3` → `azblobconfig`
* `provider: 4` → `cryptconfig` (encrypted local; root is the user's `home_dir`)
* `provider: 5` → `sftpconfig`
* `provider: 6` → `httpconfig`
* `provider: 7` → `ftpconfig`
filtersobjectoptional
Additional user options, including access restrictions and account settings.
first_downloadintegeroptional
first download time as unix timestamp in milliseconds
first_uploadintegeroptional
first upload time as unix timestamp in milliseconds
gidintegeroptional
if you run SFTPGo as root user, the created files and directories will be assigned to this gid. 0 means no change, the group will be the one of the user that runs SFTPGo. Ignored on windows
groupsarray<object>optional
Groups associated with the user. Each entry contains a group name and a type: 1 for primary, 2 for secondary, or 3 for membership only, with no inherited settings.
has_passwordbooleanoptional
Indicates whether the password is set
home_dirstringoptional
path to the user home directory. The user cannot upload or download files outside this directory. SFTPGo tries to automatically create this folder if missing. Must be an absolute path
idintegeroptional
last_loginintegeroptional
Last user login as unix timestamp in milliseconds. It is saved at most once every 10 minutes
last_password_changeintegeroptional
last password change time as unix timestamp in milliseconds
last_quota_updateintegeroptional
Last quota update as unix timestamp in milliseconds
max_sessionsintegeroptional
Maximum number of concurrent sessions and file transfers for the user. 0 means unlimited
oidc_custom_fieldsobjectoptional
This field is passed to the pre-login hook if custom OIDC token fields have been configured. Field values can be of any type (this is a free form object) and depend on the type of the configured OIDC token fields
passwordstringoptional
If the password has no known hashing algo prefix it will be stored, by default, using bcrypt, argon2id is supported too. You can send a password hashed as bcrypt ($2a$ prefix), argon2id, pbkdf2 or unix crypt and it will be stored as is. For security reasons this field is omitted when you search/get users
permissionsobjectrequired
hash map with directory as key and an array of permissions as value. Directories must be absolute paths, permissions for root directory ("/") are required
public_keysarray<string>optional
Public keys in OpenSSH authorized_keys format. A key prefixed with from="<CIDR>[,<CIDR>...]" authenticates from the listed networks. This is the supported option, written in this exact form.
quota_filesintegeroptional
Quota as number of files. 0 means unlimited. Please note that quota is updated if files are added/removed via SFTPGo otherwise a quota scan or a manual quota update is needed
quota_sizeintegeroptional
Quota as size in bytes. 0 means unlimited. Please note that quota is updated if files are added/removed via SFTPGo otherwise a quota scan or a manual quota update is needed
rolestringoptional
Role name for the user. Administrators carrying the role manage the users carrying it. Where the role isolates its resources, the account reaches the groups and the folders of its own role, and its home directory and filesystem are measured against the role storage allowlist on every save
statusintegeroptional
Account status:
* `0` user is disabled, login is not allowed
* `1` user is enabled
Allowed:01
total_data_transferintegeroptional
Maximum total data transfer as MB. 0 means unlimited. You can set a total data transfer instead of the individual values for uploads and downloads
uidintegeroptional
if you run SFTPGo as root user, the created files and directories will be assigned to this uid. 0 means no change, the owner will be the user that runs SFTPGo. Ignored on windows
updated_atintegeroptional
last update time as unix timestamp in milliseconds
upload_bandwidthintegeroptional
Maximum upload bandwidth as KB/s, 0 means unlimited. Enforced as an aggregate across the user concurrent uploads on an instance: the combined upload rate stays within this value regardless of the number of parallel transfers or protocols in use
upload_data_transferintegeroptional
Maximum data transfer allowed for uploads as MB. 0 means no limit
used_download_data_transferintegeroptional
Downloaded size, as bytes, since the last reset
used_quota_filesintegeroptional
used_quota_sizeintegeroptional
used_upload_data_transferintegeroptional
Uploaded size, as bytes, since the last reset
usernamestringrequired
Unique username. After creation it is immutable via the API.
virtual_foldersarray<object>optional
mapping between virtual SFTPGo paths and virtual folders
7 status codes
200Returns an object containing a `message` and an `error` description, which may be empty.
errorstringoptional
error description if any
messagestringoptional
message, can be empty
400Returned when the request is invalid or a submitted value fails validation.
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 specified user.
errorstringoptional
error description if any
messagestringoptional
message, can be empty
404Returned when the specified user is not 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 when the request body or its values are invalid. A 401 indicates that authentication is missing or invalid, and a 403 indicates that the authenticated user is not permitted to update this user. A 404 indicates that the user was not found, and a 500 indicates an internal server error; the username path parameter must identify the user to update.