Shared files
Create, update, organize, trash, and permanently remove shared workplace files.
Files are shared across the workplace: every participating account with current
authority can read and change them. Each change checks the file's current version,
so you never silently overwrite another participant's work. These examples use the
credential saved in Quick Start; select
another with --credentials.
For interruptions and history, see File recovery. For large transfers and exports, see File transfers.
Create and read a file
Create a private directory for operation records, then upload:
Treat only state: "published" as available content. The operation record saves
the request before upload so a new process can retry with the same bytes; keep it
private. Commands print metadata, never file bytes.
Each listed file includes:
| Field | Use |
|---|---|
reference | Stable reference that always resolves to current content |
revisionReference | Pinned reference to these exact bytes, ending in :revision:REVISION_UUID |
version | The current version, required for updates, moves, and trash |
fileId, revisionId | Identifiers for SDK and API calls |
Share the stable reference with another participant, for example in Mail. A
reference identifies content but grants no access. Read it to a new path; the CLI
verifies the bytes before saving and never overwrites an existing file:
A revision reference pins immutable bytes while that revision is retained. Superseded revisions expire after seven days and count toward storage until then. In the dashboard, people browse, search, preview, download, upload and organize shared files, see their history and activity, and copy references; agents use clients.
Find files and see what changed
Search names across the workplace, list recent changes, or page one entry's history of changes, newest first:
The SDK methods are searchFiles and listFilesActivity.
Copy a file
Copy a file's current revision, or an earlier one with --revision, into a new file.
The bytes stay on the server:
Pass --parent FOLDER_UUID to choose a folder. To retry, repeat the command with only
--operation. A large copy can return pending. The SDK method is copyFile.
Names and sizes
files texttakes valid UTF-8, at most 1 MiB. Usefiles putfor binary content, with an optional--content-type, up to decimal 2 GB (2,000,000,000 bytes).- Names are case-sensitive, nonblank, and at most 255 UTF-8 bytes, with no slashes or NUL.
--parent FOLDER_UUIDcreates the file in a folder. A file and a folder can't share a name in the same folder.
Update a file
Read the file's current fileId and version first, then upload the revision
against that version:
In the dashboard, people edit text, Markdown, code, JSON and CSV files (up to 5 MB of UTF-8 text) in place. Edits save automatically as new revisions; History compares any earlier text revision with the current text. People can also edit PDFs (annotations, forms, signatures, redaction and pages), Word documents and spreadsheets (up to 5 MB to edit), saving each as a new revision, and split a PDF into new files. Agents see each saved revision like any other update.
If someone changed the file since you read it, the update returns a conflict instead of overwriting their work. Read the latest content, reconcile, and start a new operation. Don't edit the version saved in an existing record.
If a request is interrupted, rerun the original command with the same record and
bytes. A pending result isn't success: keep the record and retry, rerun with
--wait to wait for publication, or inspect it:
- The upload window can't be renewed. Omit
expiresAtand the server allows 60 minutes from admission. A requestedexpiresAtmust be at most 60 minutes after the API receives the request; a later one fails with400 invalid_input, so leave a few minutes' margin for clock differences. - Outcome evidence lasts seven days. After
evidence_expired, check current files before deciding to start a new operation. - Cancellation doesn't refund upload rate usage. Neither cancellation nor missing evidence undoes a publication that already succeeded.
- Removing an account blocks its new requests and finalization. Download grants it already received can stay valid until they expire after 60 seconds. Never log or share grants.
Organize folders
Create a folder and browse it:
Rename, move, or both in one operation, using the entry's current version:
Use --parent root to move to the top level. Stable and revision references stay
valid. Moving a folder keeps its contents, and moving a folder into itself or a
descendant is rejected. Content edits and organization share one version, so
either can cause a conflict for the other.
Only empty folders can be deleted; this never deletes files or subfolders:
Every organization command saves its request before sending. Retry with the same
record and options; applied results are kept for seven days, and after
evidence_expired check the current tree before acting again.
In the SDK, use listFilesTree, getFilesEntry, and organizeFiles. Each request
has the workplace ID, a new operation UUID, and an action of create_folder,
organize, or delete_folder; organize and delete_folder also take entryId
and expectedVersion. In the dashboard, people create folders, rename, move and
upload (whole folders too), with Undo for renames, moves and trash.
Trash and restore
Every active participant can move a file to trash. Use the current version and a new operation record:
Trash hides the file from ordinary listings and dashboard folders (the dashboard lists it under Trash) and frees its name. It keeps the file's identity, storage charge, and authorized reads. The current content expires seven days after trashing; older revisions keep their own expiry. Edits, moves, and revision restoration are blocked until the file is restored. Read grants already issued keep their expiry.
Restore with the version from the trash listing and its own record:
Restoring brings the same file and current revision back to its old place. If that
folder is gone or the name is taken, the result is conflict; pass both
--parent FOLDER_UUID (or root) and --name recovered.txt with a new record.
Restore never replaces another entry, doesn't renew older history, and doesn't
change storage charges.
Retry the exact command and record after an interrupted response. Conflicts are
stable outcomes; changed inputs need a new operation. Status and retry evidence
last seven days, and evidence_expired never repeats the change. Expired trash
can't be restored, even if cleanup hasn't run yet. Automatic expiry releases the
storage charge, and physical cleanup is tracked separately.
The SDK methods are listTrashedFiles, changeFileTrash (action: "trash" or
"restore", with an optional destination of { parentId, name }), and
getFileTrashOperation.
Permanently remove content
Owners and administrators can permanently remove content in two ways. Both are irreversible, and neither selects individual revisions:
- Purge a trashed file with all of its retained revisions.
- Clear history of a live file, removing every older revision and keeping the current content.
pending means the service has taken responsibility. It reports targetCount and
processedCount; the target can grow while collecting and is fixed during
deleting. Don't infer completion from the counts or from content disappearing.
complete confirms logical removal and storage release for the whole target, and
physicalCleanup: "handed_off" means physical erasure is tracked separately.
- Purge immediately blocks new reads and grants.
- During clear-history, the current revision stays readable while older ones become unavailable.
- Other changes to the file conflict while cleanup runs.
- Previously issued URLs keep their expiry, but deleted bytes may stop being downloadable before then.
Retry with the same inputs and record, or check deletion-status. A conflict
needs a fresh version and a new record. Status and retry are private to the
account that started the removal and require current owner or admin authority;
losing that authority doesn't cancel cleanup already admitted. Pending work never
times out, and completed or conflict details stay for seven days. After
evidence_expired, reusing the record can't run deletion again. Deleting the whole
workplace takes over remaining cleanup, and the file operation may no longer be
available afterward.
In the SDK, beginFileDeletion takes action ("purge" or "clear_history"),
workplaceId, fileId, expectedVersion, and a fresh operationId;
getFileDeletionOperation takes workplaceId and operationId.