Attach media to a product

Attaches images/video/3D to an existing product via productUpdate's media argument (productCreateMedia is deprecated as of API 2026-04). Body: { media: CreateMediaInput[] } — each entry { originalSource, alt?, mediaContentType }; originalSource must be a publicly reachable URL, Shopify fetches it server-side (no binary upload).

  • Write — changes a live ad account immediately; needs a write-scoped token.

Uploading a file. As well as the JSON body above, this route accepts multipart/form-data with a file part (other parts ride along as platform fields), or file_base64 inside the JSON body — raw base64 or a data: URI, plus optional file_name/file_type. file_base64 is the only way an MCP caller can send bytes. mediaContentType is derived from the file and must not be passed on that path. JPEG/PNG/GIF/WebP up to 10MB; MP4/MOV/WebM up to 64MB. Above that the request is rejected by the ingress with a plain 413 (an HTML error page, not this API's JSON envelope) — the ceiling is our request-size limit, not the vendor's. A rejected type or size is 400 FILE_UPLOAD_INVALID; unavailable storage is 503 FILE_STAGING_FAILED (retry the identical request).

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Path Params
string
required
Query Params
uuid
required

The Analify organization whose connected account to use.

Body Params

{ media: [{ originalSource, alt?, mediaContentType }] }

string

Raw base64 or a data: URI carrying the file bytes. Alternative to the multipart transport; the only one available to MCP callers.

string
string

MIME type; optional when file_base64 is a data: URI.

Headers
string
enum
Defaults to application/json

Generated from available request content types

Allowed:
Responses
200

OK

Language
Credentials
Bearer
anlfy_...
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json