Docly Developers
Function API only Updated 17 Oct 2026

addFolderShare(path, user, access, [message])

Creates a new share / overwrites existing for a specific folder and user, and sends an invitation email to the specified user.

Parameters

pathstringrequired

Path to the folder to share, from the site root.

userstring (email)required

Email of the user. Several emails can be given.

accessstringrequired

A string with letters describing the access level:
B - browse (read in Docly and on websites)
C - create new files and folders
M - modify — use together with B
V - visit (web site read access only)

Example: "BM" meaning read and modify

messagestringoptional

Optional message to send to user

Returns

true for success, otherwise throws an error — for example when the folder is not found, or only exists in the app the site is published from (error 110). The call runs as the site's publisher.

Example

Normal JavaScript, running in the browser or on the Docly™ server.
docly.addFolderShare("Test folder", "test@docly.net", "V", "Access granted to view folder");