to navigate to open Esc to close Search by Algolia

API: Sharing files and folders

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

Request Parameters Reference

Parameter Type Required Description
path string Yes The FileRun path of the file or the folder. See this page
role string Yes One the following roles:
uploader
viewer
commenter
distributor
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 1 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.

Note: What a guest account (email) may do with a share is limited by the Guest role, whatever the share role says. A guest can never rename, move or delete, change tags, ratings and other metadata, write comments, share or create web links. A guest can edit files only when the Guest role allows editing (possible since FileRun 2026.3.1). So the roles distributor, contributor and manager give a guest nothing more than viewer, editor or uploader. See Guest accounts.