Skip to content

Product Videos — Upload

Uploads a new video for the given product.

REST only — GraphQL upload not supported

Binary file parts are not transportable over JSON GraphQL. The GraphQL createAdminCatalogProductVideo mutation exists as a placeholder only and rejects with 422. Use this REST endpoint for video upload.

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.