PUT/user/shares/{id}

Update a share

Updates an existing share belonging to the authenticated user. Pass the share identifier in id and provide the share settings to change, including its paths, access scope, or restrictions. Use [**redacted**] for password to preserve the existing password.

1 parameter · 17 body fields
idstringrequired
The unique identifier of the share to update.

Share settings to update.

allow_fromarray<string>optional
Limit the share availability to these IP/Mask. IP/Mask must be in CIDR notation as defined in RFC 4632 and RFC 4291, for example "192.0.2.0/24" or "2001:db8::/32". An empty list means no restrictions
created_atintegeroptional
creation time as unix timestamp in milliseconds
descriptionstringoptional
optional description
expires_atintegeroptional
optional share expiration, as unix timestamp in milliseconds. 0 means no expiration
groupsarray<object>optional
Groups granted access to the share, with each group's permissions represented as a bitmask: `1` for read, `2` for write, and `4` for delete; combine values to grant multiple permissions.
idstringoptional
auto-generated unique share identifier
last_use_atintegeroptional
last use time as unix timestamp in milliseconds
max_tokensintegeroptional
maximum allowed access tokens. 0 means no limit
namestringoptional
Name of the share.
optionsobjectoptional
Additional access options: set `auth_mode` to `1` to enable email authentication and provide recipient addresses in `emails`; set `legal_agreement` to `1` to require agreement acceptance, if enabled by a system administrator.
passwordstringoptional
optional password to protect the share. The special value "[**redacted**]" means that a password has been set, you can use this value if you want to preserve the current password when you update a share
pathsarray<string>optional
paths to files or directories, for share scope write this array must contain exactly one directory. Paths will not be validated on save so you can also create them after creating the share
scopeintegeroptional
Scopes: * `1` - Read * `2` - Write * `3` - Read/Write
Allowed:123
updated_atintegeroptional
last update time as unix timestamp in milliseconds
used_tokensintegeroptional
Number of access tokens used for the share.
user_permissionsintegeroptional
Computed bitmask representing the share permissions. 1 means Read, 2 Write, 4 Delete
usernamestringoptional
Owner of the share. Only the owner can update paths and manage group membership

7 status codes
200Returns a response object containing a message and an error description if one is present.
errorstringoptional
error description if any
messagestringoptional
message, can be empty
400Returned when the update request 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 authenticated user is not permitted to update the share.
errorstringoptional
error description if any
messagestringoptional
message, can be empty
404Returned when the specified share 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 update request is invalid; a 401 when the request is unauthenticated; a 403 when the authenticated user is not permitted to update the share; and a 404 when the share is not found. A 500 is returned when an internal server error occurs. The id path parameter must identify a share belonging to the authenticated user; scope must be 1, 2, or 3, and a write-scoped share must have exactly one directory in paths.