Upload Asset
Assets
Upload Asset
Upload a binary file directly to Filemonk storage and turn it into an internal asset.
POST
Upload Asset
Beta. The direct upload flow is in active development. The request and
response shapes shown here are stable for production use, but we may add new
fields or capabilities (e.g. larger file ceilings, resumable uploads) without
notice. We’ll announce breaking changes in advance if any become necessary —
contact support to be notified.
Overview
Filemonk’s direct upload API is built around a singlePOST /assets call. For
internal assets the response includes the presigned URL you use to upload the
file body — there is no separate “initiate” step.
The per-file ceiling is 2 GB. Need to upload larger files via the API?
Get in touch.
All endpoints use the same authentication (X-Auth-Token) and rate-limit
bucket as the rest of the API. Plan storage and asset-count quotas are
enforced before any upload URL is issued — calls that would exceed your quota
return 422 with code: asset_storage_limit_exceeded or
asset_count_limit_exceeded.
1. Create the asset and get the upload URL
2. Upload the file body
PUT the file directly to upload.url. The URL is valid for one hour.
POST /digital_products,
or attached directly to an order via
POST /orders/{id}/attach_assets.
Putting it together: multiple files on one product
A common pattern is uploading several files for the same Shopify product (e.g. high-res + low-res versions, or chapter-by-chapter PDFs). Create each asset, upload its body, then attach all of them in a singlePOST /digital_products call:
Node.js
asset_ids
from GET /digital_products/{id}, union them with the new ones, and PATCH
with the full list — the update is a replace, not an append.
Delivering a file to a specific order
Beta. The order asset and notification endpoints are in active development.
See Upload File to Order for the full
guide.
external asset (pass external_url instead of uploading)
— the same attach + notify flow works for any asset type.
Cleaning up abandoned uploads
If you create an asset but neverPUT the file body (or the PUT fails and
you don’t retry), the asset row still counts against your plan’s storage and
asset-count quotas. Call DELETE /assets/{id} to free quota immediately —
it removes the asset row, the underlying blob, and the R2 object in a single
call.
Notes
- Plan quota is checked at create time using the declared
byte_size. - Uploads must finish within one hour of the URL being issued.
- The
keyof the underlying R2 object is namespaced to your shop (external_api/<shop_id>/...) — you do not need to manage keys yourself. watermark_assetandautogenerate_licence_keywork the same way for uploaded assets as forexternal/licencetypes — pass them on the create call if needed.