Skip to main content
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.
Use this endpoint rather than Fluid’s lower-level asset endpoints. Those are internal steps of the upload flow and can change without notice.

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 on upload.fluid.app.

Upload a file

Send the file as multipart/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.

Upload from the CLI

The Fluid CLI’s assets plugin sends the same request for you. Install it, sign in with fluid login, then upload a local file or a file at a URL:
Give either a file path or --url, not both. --description sets the description, and --create-media also creates a media item, published at once, as described in Create a media item. The command prints the response below. fluid dam is another name for fluid assets.

Response

A successful upload returns 200 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

Send create_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.
A media item created this way is active and published immediately, and it appears in the public media list. Only use create_media for files you mean to show shoppers. To stage content, upload without it and create the media item yourself as a draft with the storefront media API.
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.

Upload from the command line

The Fluid CLI’s assets plugin wraps this endpoint. Install it next to the CLI, and sign in:
Upload a local file, or have the upload service fetch one from a URL:
fluid dam upload is the same command. Pass a file path or --url, not both. The command prints the service’s JSON response. The command uses the token from fluid login. To use another one, pass it before the subcommand: fluid assets --token <token> upload ./summer-hero.jpg. Compress large images and videos before you upload them, so the pages that show them load faster.
  • Authentication — company and partner tokens.
  • DAM picker — let people choose and upload files in your own UI.
  • Upload a private file — profile pictures, contact photos, and other files that shouldn’t appear in the DAM.