Skip to main content

Upload a media file

POST 

/media/upload

Upload a file to create a new media item. Send as multipart/form-data with file, or JSON with base64-encoded file. Optionally include products (array of product IDs) and central (boolean).

Accepted file types:

  • JPEG (.jpg, .jpeg) — minimum 1500×1500 pixels, must be square.
  • PNG (.png) — opaque PNGs must be minimum 1500×1500 pixels and square. PNGs with transparency have no dimension restrictions.
  • PDF (.pdf) — uploaded as a link/brochure media item (no dimension restrictions).

Other file types are rejected with a validation error.

Requires organization manager role

This endpoint requires the media.create permission, which is only available to users with the organization manager role or higher. Users with roles such as software developer or medical professional cannot upload media.

Request

Responses

Successful operation. Returns the created media item.