POST https://upload.fluid.app/upload is the one supported way to add a file to your company’s DAM from your own code. It takes the file, stores it, and returns the new asset in one request.
Before you start
- Call it from your server. Authenticate with a company token or a partner token whose role can update media. Never send either token to a browser.
- The asset goes to the token’s company.
- Use this host, not
api.fluid.app. The upload service runs onupload.fluid.app.
Upload a file
Send the file asmultipart/form-data:
For a file larger than 100 MB, put the other fields before
file in the form. Large uploads are streamed, and fields that arrive after the file are ignored.
Response
A successful upload returns200 with the new asset:
default_variant_url is the file’s CDN address. Store id or code to refer to the asset later.
Create a media item
Sendcreate_media=true to also create a media item from the upload, so it can be used in the storefront and the media widget. This applies to images, videos, and PDFs; other file types are uploaded to the DAM without a media item.
When create_media succeeds, the response also carries a media object with the new media item under medium.
Errors
A
500 can arrive after the asset was stored — for example, when the asset was created but the media item wasn’t. Before retrying, check the DAM for the asset so you don’t upload it twice.
Related
- Authentication — company and partner tokens.
- DAM picker — let people choose and upload files in your own UI.