Share a Google Drive file with a person or the organization
Creates a Drive permission for one file using the calling member’s Google Workspace account. To share with one person pass type=user plus emailAddress; to share with the entire organization pass type=domain plus the org’s Google Workspace domain (e.g. openworklabs.com). Sharing files not created through OpenWork needs the Full Drive access feature enabled by an admin.
Path Parameters
Google Drive file id.
1 - 512Body
Use type=user to share with one person, or type=domain to share with the entire organization.
user, domain Required when type=user; pass the person's email address, for example raghav@openworklabs.com.
320^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$Required when type=domain; pass the organization's Google Workspace domain, for example openworklabs.com.
1 - 255Drive permission role to grant.
reader, commenter, writer Whether Google should email the recipient about the new access.