> For the complete documentation index, see [llms.txt](https://docs.altura.com/altura-documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.altura.com/altura-documentation/api-reference/smart-nft-endpoints/add-a-new-image.md).

# Add a New Image

This method allows you to append a new image to an existing item at a specified index and optionally set the newly appended image as the primary image.

### Add a new image

## Adds a new image to an items otherImage's array

<mark style="color:green;">`POST`</mark> `https://api.alturanft.com/api/v2/item/append_images`

Takes an item's collection address, tokenId, a property name, an imageUrl and your API key and appends a new image to the item's otherImage array

#### Query Parameters

| Name                                     | Type   | Description  |
| ---------------------------------------- | ------ | ------------ |
| apiKey<mark style="color:red;">\*</mark> | String | Your API key |

#### Request Body

| Name                                         | Type    | Description                                                       |
| -------------------------------------------- | ------- | ----------------------------------------------------------------- |
| address<mark style="color:red;">\*</mark>    | String  | The item's collection address                                     |
| tokenId<mark style="color:red;">\*</mark>    | Integer | The item's tokenId                                                |
| imageUrl<mark style="color:red;">\*</mark>   | String  | The url of the image/video to add                                 |
| imageIndex<mark style="color:red;">\*</mark> | Int     | The index that the image should be inserted into                  |
| setAsPrimary                                 | Boolean | Boolean to set the newly appened image as the items primary image |

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

```javascript
{
    // Response
}
```

{% endtab %}

{% tab title="500: Internal Server Error " %}

```javascript
{
    // Response
}
```

{% endtab %}
{% endtabs %}

{% hint style="info" %}
SET\_AS\_PRIMARY is an optional Boolean value. If set true, the newly appended image is set as the item's primary image.
{% endhint %}
