Skip to content

Product Videos — Upload ​

Uploads a new video for the given product.

Video upload is REST-only. A binary file part cannot be carried in a JSON GraphQL request, so the createAdminCatalogProductVideo mutation exists as a placeholder and rejects with 422.

Endpoint ​

EndpointMethod
/api/admin/catalog/products/{productId}/videosPOST

Content type ​

multipart/form-data — required.

Form fields ​

FieldTypeRequiredNotes
videofileyesOne of mp4, webm, ogg, mov (max 100 MB).
positionintegernoSort position; appended to the end if omitted.

Response ​

201 Created

FieldTypeNotes
idintegerNew product_videos.id.
productIdintegerParent product ID (echoed).
pathstringStorage-relative file path.
positionintegerSort position.
urlstringPublic URL.

Errors ​

HTTPCause
401 UnauthorizedMissing or invalid admin Bearer token.
403 ForbiddenAdmin role lacks catalog.products.edit.
404 Not FoundProduct not found.
422 Unprocessable EntityMissing file, invalid type, or oversized payload.

Released under the MIT License.