> ## Documentation Index
> Fetch the complete documentation index at: https://developers.myhero.so/llms.txt
> Use this file to discover all available pages before exploring further.

# Share documents

> Share documents or folders (a folder brings everything in it) with people by email, as editors or viewers. Each is emailed an invitation, which can't be…

`share_documents`

Share documents or folders (a folder brings everything in it) with people by email, as editors or viewers. Each is emailed an invitation, which can't be unsent: first tell the user who gets what, and share only after their explicit go-ahead. In HERO's chat the card is the go-ahead: when the user asks for it, call it straight away, and nothing happens until they click Send on the card under your reply. People who can already open them are skipped. Needs a workspace owner or admin.

## Parameters

**documentIds** `array\<string\>` *required*

Documents or folders, all from one project.

**emails** `array\<string\>` *required*

**role** `string, enum: 'editor' | 'viewer'` *required*

An editor can change them; a viewer can only read.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.