What it does
A signed address to upload one shop file: a digital download the shop sells, kept private (never on the site's address). name: the file's name, such as guide.pdf. size: its exact size in bytes (at most 2 GB); it counts toward the plan's storage. Send the bytes with curl -X PUT -T <file> before expires_at, then name the file in a product's download column. Needs can_shop and the files bucket.
Plans
Needs a paid plan: Pro or Ultra. On other plans your agent gets an error that says so. See Limits for what each plan includes.
Parameters
| Name | Type | About |
|---|---|---|
site_idrequired | string | The id of the site. list_sites gives the ids of your sites. |
namerequired | string | The file's name, such as guide.pdf: letters, digits, spaces, dot, dash or underscore, up to 120 characters. Products name it in their download column. |
sizerequired | integer | The file's exact size in bytes, at most 2 GB (2147483648). It is reserved against the plan's storage while the link runs. |
idempotency_key | string | Any unique string (1-200 printable ASCII). A retry with the same key and arguments returns the first call's result instead of running again. Same as the Idempotency-Key header. |
Example
Call create_shop_upload_url with these arguments:
{
"site_id": "01a1…",
"name": "guide.pdf",
"size": 2481033
}
Ids like 01a1… stand for your own. list_sites and list_tables give you the real ones.
Related guides
- Digital downloadsSell files: ebooks, music, templates, courses.