Create folder

Create a folder, with missing parent folders.

POST https://cotlet.dev/api/v1/nextcloud/folders

write

Creates a folder at the path, and any parent folders that are missing. If the folder already exists, nothing changes and the call says so. create_folder runs without asking first: it reaches no one and an empty folder is removed with one click in the Files app.

Parameters

Parameters: create_folder
NameTypeDescription
path string required string Path inside your files, starting with a slash, e.g. '/Clients/Acme/proposal.pdf'.

Request

cURL
curl -X POST https://cotlet.dev/api/v1/nextcloud/folders \
  -H "Authorization: Bearer $COTLET_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"path":"/Clients/Acme/proposal.pdf"}'
Python
result = client.call("nextcloud", "create_folder", {"path":"/Clients/Acme/proposal.pdf"})
Node.js
const result = await cotlet.call('nextcloud', 'create_folder', {"path":"/Clients/Acme/proposal.pdf"});
CLI
cotlet call nextcloud create_folder --data '{"path":"/Clients/Acme/proposal.pdf"}'

Example response

JSON

{
  "path": "/Clients/Acme/Contracts",
  "status": "created"
}

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.