Update a drop's content
dropthis_update_contentUpdate an existing drop's content with new files while preserving its URL. Patch mode adds or updates only the files you send; replace mode swaps the entire bundle.
Instructions
Update the content of an EXISTING drop, keeping its current URL (ships a new deployment). Requires drop_id (the drop_… id from publish — id-only; call dropthis_resolve to convert a URL/slug) and exactly one content input (content, files, file, paths, or source_url). Use when the user edited, changed, regenerated, or wants to update the page and the URL should stay the same. PARTIAL BY DEFAULT (mode:"patch"): the files you send are upserted by path and every file you do NOT mention is carried forward unchanged — so to fix one page send only that page (a previously-bundled image stays), and to remove a file pass its path in delete_paths (e.g. delete_paths:["assets/old.png"]). Use mode:"replace" only to swap the ENTIRE content set in one call (the files you send become the whole drop and everything else is dropped; delete_paths is invalid in replace mode). Ships content only — it never changes settings; for title/visibility/password/expiry/metadata use dropthis_update_settings, and to create a brand-new drop use dropthis_publish. Not idempotent: a retry creates another deployment unless you pass the same idempotency_key. Oversized png/jpeg/webp images in the new content are optimized server-side by default (re-encoded smaller, paths unchanged, every transform disclosed in the response warnings[] as image_optimized/image_optimize_skipped); pass optimize:false for byte-exact storage.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file | No | Local file OR directory path (stdio/local only). | |
| mode | No | How to apply the files: "patch" (default) upserts the files you send and keeps every file you don't mention (use `delete_paths` to remove one); "replace" makes the files you send the drop's entire content set and drops the rest. Omit for patch. | |
| path | No | Filename/path for inline content. | |
| entry | No | Entry file for a multi-file bundle. | |
| files | No | A drop holds up to 200 files; each file is `content` (text you write), `source_url` (a remote asset dropthis fetches server-side — use this for images/video/pdf/fonts), or `content_base64` (small inline bytes only); never base64-inline an image into HTML. HTML/CSS/JS reference bundled assets by relative path. PATCH BY DEFAULT (mode="patch"): the files you send are upserted by path; every file you do NOT mention is kept untouched — so to fix one page send only that page, and to remove a file list its path in `delete_paths`. Use mode="replace" only to swap the ENTIRE content set in one shot (the files you send become the whole drop; everything else is dropped, and `delete_paths` is then invalid). `entry` selects the main file when it is not `index.html`. | |
| paths | No | List of local file/directory paths to deploy as one bundle (stdio/local only). | |
| content | No | Inline HTML or text. | |
| drop_id | Yes | The `drop_…` id of the drop to update (id-only — a URL or slug is rejected; call dropthis_resolve to turn a public URL/slug into its id first). | |
| optimize | No | Server-side image optimization for oversized png/jpeg/webp files, on by default — omit to use the server default (true); every transform is disclosed in the response warnings[] (image_optimized/image_optimize_skipped). Pass false for byte-exact storage. | |
| source_url | No | Public http(s) URL to fetch and deploy. | |
| if_revision | No | Optimistic lock: fail if revision differs. | |
| content_type | No | MIME type for inline content. | |
| delete_paths | No | Paths to remove from the drop in patch mode, e.g. ["old/stale.js","assets/dead.png"]. Patch-mode only — invalid with mode:"replace" (in replace, omitting a file already removes it). | |
| idempotency_key | No | Prevent duplicate deploys on retry. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | No | The drop's permanent drop_… id — persist it for every follow-up tool. | |
| url | No | The canonical, always-branded public URL (share with humans). | |
| next | No | Structured follow-up hints keyed by action. | |
| slug | No | URL slug — a locator, not an id. | |
| title | No | ||
| rawUrl | No | Raw-bytes URL for a single non-HTML file; null for HTML drops and collections. | |
| status | No | ||
| noindex | No | ||
| metadata | No | ||
| revision | No | ||
| expiresAt | No | ||
| sizeBytes | No | Total published bundle size in bytes — check before iterating on a heavy page. | |
| workspace | No | The workspace this drop belongs to {id, slug, name, kind}. | |
| visibility | No | ||
| passwordProtected | No |