Share a folder
PUT /api/2.0/files/folder/{folderId}/share
Request
Sets the sharing settings to a folder with the ID specified in the request.
Note: Each of the sharing parameters must contain two values: "ShareTo" - ID of the user with whom we want to share a folder, "Access" - access type which we want to give to the user (Read, ReadWrite, etc).
Authorization
An API key is a token that you provide when making API calls. Include the token in a header parameter called Authorization
.
Example: Authorization: 864FE52C-1C1C-469F-9308-51DAFEFE7436
.
Headers
- Accept
enum of string
Can be one of:
application/json
.- Content-Type
enum of string
Can be one of:
application/json
.
Path
- folderId
string
Folder ID
Body
- share
array of object
Collection of sharing parameters
- ShareTo
string
uuid - Access
enum of integer
int32 [0 - None, 1 - ReadWrite, 2 - Read, 3 - Restrict, 4 - Varies, 5 - Review, 6 - Comment, 7 - FillForms, 8 - CustomFilter]
Can be one of:
None
,ReadWrite
,Read
,Restrict
,Varies
,Review
,Comment
,FillForms
,CustomFilter
.
- notify
boolean
Notifies users about the shared folder or not
- sharingMessage
string
Message to send when notifying about the shared folder
Examples
PUT /api/2.0/files/folder/%7BfolderId%7D/share HTTP/1.1
Accept: application/json
Content-Length: 138
Content-Type: application/json
Host: example.com
{
"share": [
{
"value": {
"ShareTo": "2fdfe577-3c26-4736-9df9-b5a683bb8520",
"Access": "0"
}
}
]
}
curl --request PUT \
--url https://example.com/api/2.0/files/folder/%7BfolderId%7D/share \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
"share": [
{
"value": {
"ShareTo": "2fdfe577-3c26-4736-9df9-b5a683bb8520",
"Access": "0"
}
}
]
}'
Responses
200
Shared folder information
401
Unauthorized