v2

OpenAPI 3.1.02026-08-05298342605.2 KB
Capability Sources

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.

post/v1/capabilities/google-workspace/drive-file-share/{fileId}

Path parameters

fileIdstring required

Google Drive file id.

Request body

type'user' | 'domain' required

Use type=user to share with one person, or type=domain to share with the entire organization.

emailAddressstring email

Required when type=user; pass the person's email address, for example raghav@openworklabs.com.

domainstring

Required when type=domain; pass the organization's Google Workspace domain, for example openworklabs.com.

role'reader' | 'commenter' | 'writer'

Drive permission role to grant.

sendNotificationEmailboolean

Whether Google should email the recipient about the new access.

Response

Google Drive file shared.

oktrue required
fileIdstring required
permissionIdstring required
typestring required
rolestring required