API: Sharing files and folders

Target URL /api.php/Drive/files/share
Required scope share
HTTP Method GET/POST
Output format JSON

Request Parameters Reference

Parameter Type Required Description
path string Yes The FileRun path of the file or the folder.
role string Yes One the following roles:
uploader
viewer
commenter
editor
contributor
manager
puid string Yes, if no gid or email Public ID of FileRun user to share folder with.
gid integer Yes, if no puid or email ID of FileRun group to share folder with.
email string Yes, if no puid or gid E-mail address of guest user to add and share with.
notify boolean No Set to true to send e-mail notifications.
message string No Message to include in the e-mail notifications.

Note: If the file or folder was already shared, the share settings will be updated. No errors will be returned in that case.