# Add images

Adds images. Works with Shopify and WooCommerce accounts.

```http
POST https://api.pozy.ai/v1/commerce/products/{productId}/images
```

- Area: Commerce / Commerce
- Auth: Authorization: Bearer pz_live_...

## Path parameters

- `productId` (string, required)

## Request body

Content type: `application/json`

- `accountId`, string, required
- `images`, array of object, required: At least 1 item. Up to 20 items
  - `url`, string (URL), required
  - `altText`, string

## Example request

```bash
curl -X POST "https://api.pozy.ai/v1/commerce/products/659773d34b353e6821202f21/images" \
  -H "Authorization: Bearer $POZY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "accountId": "696e0b682d0a31188e7a2ba9",
  "images": [
    {
      "url": "https://pozy.ai/media/example-1.jpg"
    }
  ]
}'
```

```ts
const res = await fetch("https://api.pozy.ai/v1/commerce/products/659773d34b353e6821202f21/images", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.POZY_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    accountId: "696e0b682d0a31188e7a2ba9",
    images: [
      {
        url: "https://pozy.ai/media/example-1.jpg"
      }
    ]
  }),
});
const data = await res.json();
if (!res.ok) throw new Error(data?.error ?? `Request failed with status ${res.status}`);
console.log(data);
```

```python
import os
import requests

resp = requests.post(
    "https://api.pozy.ai/v1/commerce/products/659773d34b353e6821202f21/images",
    headers={"Authorization": f"Bearer {os.environ['POZY_API_KEY']}"},
    json={
        "accountId": "696e0b682d0a31188e7a2ba9",
        "images": [
            {
                "url": "https://pozy.ai/media/example-1.jpg",
            },
        ],
    },
    timeout=30,
)
resp.raise_for_status()
print(resp.json())
```

## Response 200

- `product`, object
  - `id`, string
  - `accountId`, string
  - `platform`, string: One of `shopify`
  - `title`, string
  - `descriptionHtml`, string: Can be null
  - `handle`, string: Can be null
  - `vendor`, string: Can be null
  - `productType`, string: Can be null
  - `tags`, array of string
  - `status`, string: One of `active`, `draft`, `pending_review`, `rejected`, `inactive`, `archived`, `deleted`
  - `platformStatus`, string
  - `featuredImage`, object
    - one of: Commerce Image
      - `id`, string: Can be null
      - `url`, string
      - `altText`, string: Can be null
  - `images`, array of object
    - `id`, string: Can be null
    - `url`, string
    - `altText`, string: Can be null
  - `options`, array of object
    - `name`, string
    - `values`, array of string
  - `variants`, array of object
    - `id`, string
    - `title`, string
    - `sku`, string: Can be null
    - `barcode`, string: Can be null
    - `price`, object
      - `amount`, string, required
      - `currency`, string, required
    - `compareAtPrice`, object
      - one of: Commerce Money
        - `amount`, string, required
        - `currency`, string, required
    - `inventoryQuantity`, integer: Can be null
    - `availableForSale`, boolean: Can be null
    - `options`, array of object
      - `name`, string
      - `value`, string
  - `totalInventory`, integer: Can be null
  - `url`, string: Can be null
  - `seo`, object
    - `title`, string: Can be null
    - `description`, string: Can be null
  - `createdAt`, string (date-time): Can be null
  - `updatedAt`, string (date-time): Can be null
  - `publishedAt`, string (date-time): Can be null
  - `platformData`, object: Can be null

```json
{
  "product": {
    "id": "6bfebd43ddc270f6d2c56fc5",
    "accountId": "696e0b682d0a31188e7a2ba9",
    "platform": "shopify",
    "title": "Launch day",
    "descriptionHtml": "string",
    "handle": "acme",
    "vendor": "string",
    "productType": "string",
    "tags": [
      "string"
    ],
    "status": "active",
    "platformStatus": "instagram",
    "featuredImage": {
      "id": "6bfebd43ddc270f6d2c56fc5",
      "url": "https://pozy.ai/media/example-1.jpg",
      "altText": "Hello from Pozy"
    },
    "images": [
      {
        "id": "6bfebd43ddc270f6d2c56fc5",
        "url": "https://pozy.ai/media/example-1.jpg",
        "altText": "Hello from Pozy"
      }
    ],
    "options": [
      {
        "name": "Acme",
        "values": [
          "string"
        ]
      }
    ],
    "variants": [
      {
        "id": "6bfebd43ddc270f6d2c56fc5",
        "title": "Launch day",
        "sku": "string",
        "barcode": "string",
        "price": {
          "amount": "string",
          "currency": "USD"
        },
        "compareAtPrice": {
          "amount": "string",
          "currency": "USD"
        },
        "inventoryQuantity": 1,
        "availableForSale": true,
        "options": [
          {
            "name": "Acme",
            "value": "string"
          }
        ]
      }
    ],
    "totalInventory": 42,
    "url": "https://pozy.ai/media/example-1.jpg",
    "seo": {
      "title": "Launch day",
      "description": "A short description"
    },
    "createdAt": "2026-10-02T09:00:00.000Z",
    "updatedAt": "2026-10-02T09:00:00.000Z",
    "publishedAt": "2026-10-02T09:00:00.000Z",
    "platformData": {}
  }
}
```
