create_share
Create a new share for a file or folder in Nextcloud, specifying recipient, permissions, password, and expiration. Supports user, group, link, email, federated, and talk room shares.
Instructions
Create a new share for a file or folder.
Args: path: Path to the file or folder to share (e.g. "/Documents/report.pdf"). share_type: Type of share: 0=user, 1=group, 3=public link, 4=email, 6=federated, 10=talk room. share_with: Recipient — required for all types except link (3). User share (0): username. Group share (1): group name. Email share (4): email address. Federated (6): user@remote.server. Talk room (10): room token. permissions: Bitwise permission flags. 1=read, 2=update, 4=create, 8=delete, 16=share. Common values: 1 (read-only), 15 (full, no reshare), 31 (all). Default: all permissions (31) for user/group, read-only (1) for links. Note: file shares automatically strip create (4) and delete (8) flags. password: Optional password for link (3) or email (4) shares. expire_date: Optional expiration date in "YYYY-MM-DD" format. note: Optional note/message for the share recipient. label: Optional display label for link shares (max 255 chars). public_upload: Enable public upload on shared folders (link shares only).
Returns: JSON object with the created share details including id, url (for links), token, etc.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| note | No | ||
| path | Yes | ||
| label | No | ||
| password | No | ||
| share_type | Yes | ||
| share_with | No | ||
| expire_date | No | ||
| permissions | No | ||
| public_upload | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |