List shares

Shares you created, with type, permissions, password and expiry flags.

GET https://cotlet.dev/api/v1/nextcloud/shares

read

Lists the shares of your account, optionally for one file or folder and its contents. Each share has its type (link, user, group or email), the permissions you gave, whether it has a password and its expiry date. A public link returns its URL. Pass share_id from here to remove_share.

Parameters

Parameters: list_shares
NameTypeDescription
path string string Only shares of this file or folder.
include_subfiles boolean boolean With a folder path, also shares of what is inside it. Default: false.
type enum enum all, link, user, group or email. Default: all.

Request

cURL
curl "https://cotlet.dev/api/v1/nextcloud/shares?path=%2FClients&include_subfiles=true&type=link" \
  -H "Authorization: Bearer $COTLET_API_KEY"
Python
result = client.call("nextcloud", "list_shares", {"path":"/Clients","include_subfiles":True,"type":"link"})
Node.js
const result = await cotlet.call('nextcloud', 'list_shares', {"path":"/Clients","include_subfiles":true,"type":"link"});
CLI
cotlet call nextcloud list_shares --data '{"path":"/Clients","include_subfiles":true,"type":"link"}'

Example response

JSON

{
  "shares": [
    {
      "share_id": "412",
      "path": "/Clients/Acme/proposal-q3.pdf",
      "type": "link",
      "url": "https://cloud.example.com/s/Qm4Zr8LcVt1NxWe",
      "permissions": "read",
      "password_protected": false,
      "expires": null,
      "created_at": "2026-06-02T10:11:00Z"
    },
    {
      "share_id": "455",
      "path": "/Clients/Brightly/brief.docx",
      "type": "link",
      "url": "https://cloud.example.com/s/Hd7Pb2YaUs5GkTi",
      "permissions": "read",
      "password_protected": true,
      "expires": "2026-12-01",
      "created_at": "2026-10-09T08:40:00Z"
    }
  ]
}

Sign in once. Your agent does the rest.

Sign up and add the apps you need. Free 7-day trial with 2,000 credits, no card needed.