Request Upload Slots
request_uploadReserve presigned PUT URLs for uploading one or more large or binary files directly to storage — bypassing the 1 MB inline limit. Binary files include images, PDFs and other documents, and MP4 (.mp4, .m4v) or WebM (.webm) video; video counts against storage and is capped per file at 100 MB on Lite, 250 MB on Pro and 1 GB on Business (Free is bounded by its 25 MB storage). Omit site_id to create a new pending site atomically (supply subdomain/title for the new site). Provide site_id to add or replace files on an existing site. The caller must PUT each file to its returned upload_url, then call confirm_upload once with the batch upload_id.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | Only used with site_id. merge = add/overwrite the specified files while keeping all other site files. replace = replace the entire site with only these files. Default is 'merge'. A new site (no site_id) always publishes exactly this batch. | merge |
| files | Yes | One or more files to upload. All files in this call are confirmed together as a single atomic batch. | |
| title | No | Display name for the new site. Only used when site_id is omitted. Optional. | |
| site_id | No | The site's public identifier. Omit when creating a new site — the pending site and batch are created in one operation. | |
| subdomain | No | Requested subdomain for the new site. Only used when site_id is omitted. Optional — Upfling assigns one if omitted. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| slots | Yes | ||
| site_id | No | ||
| upload_id | Yes | ||
| expires_at | Yes |