> For the complete documentation index, see [llms.txt](https://shopifyinternship.gitbook.io/imagerepository/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://shopifyinternship.gitbook.io/imagerepository/images/update-image-details.md).

# Update Image Details

## Update Image&#x20;

<mark style="color:orange;">`PUT`</mark> `{{BASE_URL}}/v1/images/update/:imageId`

The endpoints allows you update details such as permission, name, price, etc., but not the image.

#### Path Parameters

| Name    | Type   | Description                         |
| ------- | ------ | ----------------------------------- |
| imageId | string | the `imageId` to update its details |

#### Headers

| Name          | Type   | Description               |
| ------------- | ------ | ------------------------- |
| Authorization | string | Bearer `{{ACCESS_TOKEN}}` |

#### Request Body

| Name        | Type   | Description                                                      |
| ----------- | ------ | ---------------------------------------------------------------- |
| name        | string | the image title                                                  |
| permission  | string | `enum:[private, public]`                                         |
| price       | string | image price                                                      |
| discount    | number | discount in percentage.                                          |
| metadata    | string | the image metadata separated with a comma. `eg: car,blue,totoya` |
| description | string | the image description                                            |

{% tabs %}
{% tab title="200 " %}

```
{
    "success": true,
    "data": {
        "imageUpdate": {
            "imageStore": {
                "imageURL": "https://<s3>-staging.s3.amazonaws.com/<image>.peg",
                "imageVersion": "<version>",
                "eTag": "\"<eTag>\""
            },
            "price": 10000,
            "discount": 10,
            "permission": "public",
            "metadata": [
                "water",
                "tree",
                "falls"
            ],
            "_id": "60045d60f2e9150015d9ef1d",
            "userId": "<user_id",
            "name": "logniins",
            "description": "imagemake",
            "cloudinary": {
                "public_id": "<image_public_id>/nepbvgm7ivpvyidf4svr",
                "url": "http://res.cloudinary.com/<image_public_id>/image/private/s--8WRQT43V--/v1610898783/<image_public_id>/nepbvgm7ivpvyidf4svr.jpg",
                "secure_url": "https://res.cloudinary.com/<image_public_id>/image/private/s--8WRQT43V--/v1610898783/<image_public_id>/nepbvgm7ivpvyidf4svr.jpg",
                "signature": "<image_signature>",
                "format": "jpg"
            },
            "createdAt": "2021-01-17T15:53:04.630Z",
            "updatedAt": "2021-01-17T16:07:42.018Z",
            "__v": 0
        },
        "message": "Image [{\"permission\":\"public\"}] updated"
    }
}
```

{% endtab %}
{% endtabs %}
