Commands

file share

Share a file publicly, privately, or with specific users.

poly file share manages sharing for a file. Sharing is online-only — it requires connectivity to the server and doesn't work with --cache-only.

Usage

poly file share <TARGET>

TARGET accepts a file ID, a local path inside the sync folder, a //-prefixed Poly path, a deep link, or a web URL — see How it Works for the full reference syntax. Run with no mode flag to make the file public and print a summary and link.

Flags

FlagDescription
--urlPrint only the bare share URL.
--add <USER[=ROLE]>Invite or update a specific user's access. USER is an email or user ID; the role defaults to viewer.
--remove <email|user-id>Revoke a specific user's direct access.
--publicMake the file public.
--privateMake the file private.
--role <viewer|editor|admin>Role to grant. Used with --add; public modes only allow viewer or editor. Defaults to viewer.

Examples

# Make a file public and print the summary and link
poly file share //Home/docs/report.pdf

# Print just the share URL
poly file share //Home/docs/report.pdf --url

# Share with a specific user as an editor
poly file share //Home/docs/report.pdf --add [email protected]=editor

# Revoke a user's access
poly file share //Home/docs/report.pdf --remove [email protected]

# Make a public file public-editor instead of public-viewer
poly file share //Home/docs/report.pdf --public --role editor

# Make a file private again
poly file share //Home/docs/report.pdf --private

--url reuses public access inherited from a parent without writing a direct grant. Explicit --public creates a direct grant even when a parent already provides public access.

Making a file private removes its direct public access. If a parent folder grants public access, the command reports that the file remains public; revoke sharing on that parent to remove inherited access.

  • file show — get a file's URL without changing its sharing state.
  • Sharing — sharing modes, roles, and how links behave.
© Poly Corp. 2026