upload_file
Upload a file into a Files surface (kind='files'). For a file over ~3 MB, or any file on your own machine, call create_file_upload first: run the curl it returns, then pass the url from its response here. You never need a public host to put your own file into Dock. Small files can instead go inline as base64 in content_base64 (a bare base64 string or a data: URL), capped ~3 MB, the request-body limit. Provide exactly one of content_base64 / url. The server sniffs the MIME from magic bytes (don't trust the extension), enforces an allowlist, sanitizes SVGs, strips EXIF from images, and counts the bytes against your plan's storage quota. Returns the created file's {id, name, size, mimeType, parentFolderId, createdAt}. surface_slug is required (use list_surfaces to find the files surface); parent_folder_id defaults to the surface root.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | No | The `url` a `create_file_upload` link returned (large-file path; no request-body limit). Provide this OR `content_base64`, not both. | |
| mime | No | Optional MIME hint. The server still sniffs magic bytes; this only helps for extension-less or ambiguous content. | |
| slug | Yes | The workspace slug (bare or org-prefixed). | |
| filename | Yes | The file's name, including extension (e.g. "report.pdf"). | |
| surface_slug | Yes | The Files surface slug to upload into (required). | |
| content_base64 | No | The file bytes, base64-encoded. Accepts a bare base64 string or a "data:<mime>;base64,..." data URL. ~3 MB cap. Provide this OR `url`, not both. | |
| parent_folder_id | No | Optional folder id (from list_files) to place the file in. Defaults to the surface root. |