Create share
nextcloud_create_shareCreate a share for one file or folder, including public links with URLs, user, group, or talk shares, permissions, passwords, and expiry dates.
Instructions
Share one file or folder and return the share (a public link carries its url).
POST /ocs/v2.php/apps/files_sharing/api/v1/shares
share_type user/group/talk needs share_with (user id, group id
or conversation token). permissions is the OCS bitmask: 1 read,
2 update, 4 create, 8 delete, 16 share (31 all). expire_date is
YYYY-MM-DD. send_mail false (the default) creates the share
without the server mailing the recipient.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"path": "<path>"
},
"name": "nextcloud_create_share"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| note | No | ||
| path | Yes | ||
| label | No | ||
| password | No | ||
| send_mail | No | ||
| share_type | No | public_link | |
| share_with | No | ||
| expire_date | No | ||
| permissions | No | ||
| public_upload | No |