> For the complete documentation index, see [llms.txt](https://docs.ecwid.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.ecwid.com/api-reference/rest-api/products/product-images-and-videos/bulk-update-product-images-and-videos.md).

# Bulk update product images and videos

<mark style="color:purple;">`PUT`</mark> `https://app.ecwid.com/api/v3/{storeId}/products/{productId}/media`&#x20;

### Required access scopes

Your app must have the following **access scopes** to make this request: `update_catalog`

### Path params

All path params are required.

| Param     | Type   | Description          |
| --------- | ------ | -------------------- |
| storeId   | number | Ecwid store ID.      |
| productId | number | Internal product ID. |

### Headers

The **Authorization** header is required.

<table><thead><tr><th>Header</th><th width="252">Format</th><th>Description</th></tr></thead><tbody><tr><td>Authorization</td><td><code>Bearer secret_ab***cd</code></td><td>Access token of the application.</td></tr></tbody></table>

### Request JSON

A JSON object with the following fields:

| Field        | Type                          | Description                                                                                                            |
| ------------ | ----------------------------- | ---------------------------------------------------------------------------------------------------------------------- |
| mainMedia    | object mainMedia              | <p>Link to the main product image or video. <br><br>Empty or <code>null</code> value commits no changes.</p>           |
| galleryMedia | array of objects galleryMedia | <p>List of links to product gallery images and videos.<br><br>If both lists are empty the gallery will be deleted.</p> |

#### mainMedia

| Field    | Type     | Description                                                                                                                                           |
| -------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- |
| videoUrl | imageUrl | <p>Link to the main product video. <br><br>Overrides current main product image/video.<br><br>If missing, the main product video will be deleted.</p> |
| imageUrl | imageUrl | <p>Link to the main product image. <br><br>Overrides current main product image/video.<br><br>If missing, the main product image will be deleted.</p> |

#### galleryMedia

| Field    | Type     | Description                                                                                                                                                                                                                                      |
| -------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| videoUrl | imageUrl | <p>Link to the gallery product video. <br><br><code>galleryMedia</code> array overrides current gallery of product images and videos.<br><br>If <code>galleryMedia</code> is missing, all gallery product images and videos will be deleted.</p> |
| imageUrl | imageUrl | <p>Link to the gallery product image. <br><br><code>galleryMedia</code> array overrides current gallery of product images and videos.<br><br>If <code>galleryMedia</code> is missing, all gallery product images and videos will be deleted.</p> |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.ecwid.com/api-reference/rest-api/products/product-images-and-videos/bulk-update-product-images-and-videos.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
