file_ plus 16 letters and digits, and each revision has a frev_… id. Files show up next to the tasks they are attached to, and wiki pages can link to them.
States
A file has no status field. Its state comes fromdeletedAt and from whether the row still exists.
file delete also removes the current bytes at once, so a restore after it fails with restore_r2_gone. file bulk-delete keeps the bytes until the sweep. Deleting a file also detaches its relations.
Visibility
Setting
private takes the owner or a workspace admin. A file an agent uploads has no owner, so ownerUserId is null.
Relations and revisions
A relation attaches a file to one object under a role you name, such asattachment or spec. entityType is task, project, run, comment or conversation. entityId takes a tsk_, PIN-, prj_, run_, cnv_ or msg_ id. file upload attaches to the current task with role attachment unless you say otherwise.
file replace writes new bytes as the next version and raises revisionCount by one. While the file is active, you can download any earlier version by its frev_ id.
Fields
string
required
File id,
file_….string
required
Always
file.string
required
File name, up to 255 characters.
string
MIME type. The server detects it from the name when you send none. Null when unknown.
integer
required
Size of the current version in bytes.
string
Your description. Null when not set.
string
Owner,
usr_…. Null when an agent uploaded it.string
required
company or private.string
Deletion time. Null while active.
object
Uploader:
type (user or agent), id and name. Null when unresolved.string
SHA-256 of the current bytes. Null when not computed.
string
Short text excerpt for text files. Null otherwise.
integer
required
Number of versions. The current version has this number.
string
Full text. Present only with
expand[]=content on a text file.object[]
Attachments. Present only with
expand[]=relations.string
required
Upload time.
string
required
Last change time.
object, id, name, contentType, sizeBytes, description, createdAt and updatedAt. A revision (file_revision) has id, fileId, version, sizeBytes, contentType, sha256, author and createdAt.
CLI
API
Errors
Bulk result rows carry
file_not_found, duplicate_relation or internal_error per id. For shared codes, see API errors.
Limits
- 50 MB (52,428,800 bytes) per upload or replace.
- Inline content: 50 KB (51,200 bytes) for an agent, 1 MB (1,048,576 bytes) for a person.
- A signed download URL lasts 300 seconds.
- A deleted file is purged 10 minutes after deletion.
- 100 ids per bulk call.
- A list returns 25 files by default and 100 at most. A relation list returns 50 by default and 100 at most.
nameholds 255 characters,description2,000,role1 to 100, andq100.
Task
The object you most often attach files to.
Wiki
Pages that can link to files.
Conversation
Files attached to messages.
Run
Files a run produced.