PUT/groups/{name}

Replace a group configuration

Replaces the configuration of an existing group. Supply the required name and any group settings you want to set, including associated users, administrators, permissions, or virtual folders. The created_at, id, and updated_at fields are read-only and are not writable group settings.

1 parameter · 10 body fields
namestringrequired
The name of the group to replace.

Group configuration to apply. The name field is required; created_at, id, and updated_at are read-only.

adminsarray<string>optional
list of admins usernames associated with this group
created_atintegeroptional
Creation time as Unix timestamp in milliseconds.
descriptionstringoptional
Optional free-form description.
idintegeroptional
Read-only group identifier.
namestringrequired
Unique group name. Referenced from `User.groups[].name` with a type (primary/secondary/membership).
rolestringoptional
Role name. A group carrying a role with `resource_isolation` enabled is visible to the admins carrying the same role, it is reachable from the accounts of that role and its storage is measured against the allowlist of the role. An admin carrying a role receives that role on the groups it creates. On update the body replaces the stored role: omitting it clears the role, and the change is refused while accounts or admins of another role reference the group
updated_atintegeroptional
Last update time as Unix timestamp in milliseconds.
user_settingsobjectoptional
Default settings for users in the group, including filesystem configuration, home directory, permissions, session limits, transfer limits, and quotas.
usersarray<string>optional
list of usernames associated with this group
virtual_foldersarray<object>optional
mapping between virtual SFTPGo paths and folders

7 status codes
200Returns a response object with an `error` description, if any, and a `message` that can be empty.
errorstringoptional
error description if any
messagestringoptional
message, can be empty
400Returned when the request body is invalid.
errorstringoptional
error description if any
messagestringoptional
message, can be empty
401Returned when the request is unauthenticated.
errorstringoptional
error description if any
messagestringoptional
message, can be empty
403Returned when the caller is not permitted to update the group.
errorstringoptional
error description if any
messagestringoptional
message, can be empty
404Returned when the group does not exist.
errorstringoptional
error description if any
messagestringoptional
message, can be empty
500Returned when the server encounters an error.
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 is invalid. A 401 is returned when the request is unauthenticated. A 403 is returned when the caller is not permitted to update the group. A 404 is returned when the group does not exist. A 500 is returned when the server encounters an error. The name path parameter identifies the group, and the body name field is required; permissions must contain at least one entry, use absolute directory paths, and include permissions for /.