MailMasker API
Claude Code
Drive

Share a folder

POST/api/v1/drive/folders/:id/share

Who can use this: Any signed-in accountAs Markdown

The link opens the whole folder, subfolders included, to browse and download, but nothing outside it. As with a file, a public link opens for anyone who has it, and naming a person in shared_with makes it open only for them, signed in, lists it for them and emails them the link.

Parameters

NameWhereWhat it is
id required path The folder's id.e.g. 7
shared_with query The address of the person to share with. Leave it out for a public link.
expires_days query The link stops working after this many days (1 to 9999). Leave it out for a link that lasts until you revoke it.e.g. 7

Good to know

  • What you add to the folder later is shared too, and anything inside it you move to Trash drops out of the share.
  • You can't share with yourself (400). A folder that isn't yours, or is in Trash, answers 404.