Shares allows sharefile users to give access to files and folders to other users. Shares are used to "Send" or "Request" files to anonymous or named users, without giving the target direct access to the user folders.Shares contain policies - such as expiration, maximum number of downloads, authentication options.
POST https://account.sf-api.com/sf/v3/Shares/Send
{
"Items":["itemId1", "itemId2"],
"Emails":["email@sharefile.com", "email2@sharefile.com"],
"Subject": "Email Subject",
"Body": "Email Message",
"CcSender": false,
"NotifyOnDownload": true,
"RequireLogin": false,
"MaxDownloads": 30,
"ExpirationDays": -1
}
Sends an Email to the specified list of addresses, containing a link to the specified Items. The default number of expiration days is 30. Setting it to -1 disables share expiration. Note that the Emails and Items parameters expect an array of strings, rather than nested JSON objects.
parameters | ShareSendParams | ShareSendParams object. Mandatory parameters are Items, Emails, and Subject. |
Returns: Share object
POST https://account.sf-api.com/sf/v3/Shares/Request
{
"FolderId":"folderId",
"Emails":["email@sharefile.com", "email2@sharefile.com"],
"Subject": "Email Subject",
"Body": "Email Message",
"CcSender": false,
"NotifyOnUpload": true,
"RequireLogin": false,
"ExpirationDays": -1
}
Sends an Email to the specified list of addresses, containing a link to upload to the specified folder. The default number of expiration days is 30. Setting it to -1 disables share expiration. Note that the Emails parameter expectd an array of strings, rather than nested JSON objects.
View Only: View Only share can be created by either setting "IsViewOnly = true" or "share.ShareAccessRight.ShareAccessRightType = ViewOnline" If both "share.IsViewOnly = true" and "share.ShareAccessRight.AccessRightType = FullControl" are passed to this method, then the "Full Control" permission takes higher priority and disables "ViewOnly" permission on the share.
parameters | ShareRequestParams | ShareRequestParams object. Mandatory parameters are FolderId or FolderPath, Emails, and Subject. |
Returns: Share Object
GET https://account.sf-api.com/sf/v3/Shares(id)/Redirection
Returns the redirection endpoint for this Share.
id | String | Share identifier |
Returns: The Redirection endpoint Information
GET https://account.sf-api.com/sf/v3/Shares/Inbox
GET https://account.sf-api.com/sf/v3/Shares/Inbox(id)
Retrieve all outstanding Shares in the inbox.
userId | String | User identifier |
type | ShareType | Share type |
archived | Boolean | Only get archived items |
Returns: List of Shares created by the authenticated user