Create upload
POST
/ admin/ v1/ stores/ {store_id}/ media/ uploads- products:write
- content:write
- Idempotency-Key supported
Reserve a file and get the permission to upload it. Send the bytes to the files edge as upload says, then call POST /media/{media_id}/complete with the edge's receipt.
Path parameters
store_idstringrequiredThe store's ID, like
store_01k8qs5s…. Apps get it with the install, in the OAuth redirect and the token response.
Headers
Idempotency-KeystringSend the same key to retry safely: the first answer is replayed for 24 hours.
shop-api-versionYYYY-MMThe version to answer in. Without it, your app’s pinned version, else the newest.
Body
filenamestringrequiredcontent_typestringrequiredJPEG, PNG,
WebP, GIF, AVIF (≤ 20 MB), MP4,WebM(≤ 500 MB) or PDF (≤ 25 MB).size_bytesintegerrequiredaltstring · or null
Returns
201 Upload slot created.
Errors
- 403
forbiddenMissing permission. - 422
validation_failedUnsupported type, size or name.