---
title: "Create a product image"
method: POST
path: "/products/{product_id}/images"
---

# Create a product image

`POST /products/{product_id}/images`

## Request

- Base URL: `https://api.ecommerceapi.uk/v1`
- URL: `https://api.ecommerceapi.uk/v1/products/{product_id}/images`
- Auth: HTTP basic

Creates a new product image.

## Path parameters

- `product_id` integer, required

## Request body

- ProductImageCreate
  - `image` string, required: URL or base64 encoded image.
  - `imageName` string: The file name for the image.
  - `description` string: The ALT tag for the product image.
  - `sortOrder` integer: The sort order for the product image.

## Response `201`

Product image created successfully.

- ProductImage
  - `id` integer: Product image ID.
  - `url` string: Product image URL.
  - `description` string: The ALT tag for the product image.
  - `sortOrder` integer: Product image sort order.

---

[API](https://skmtc.dev/ecommerceapi/apis/product-images.md) - [All operations](https://skmtc.dev/ecommerceapi/apis/product-images/llms.txt) - [OpenAPI document](https://skmtc.dev/ecommerceapi/apis/product-images/revisions/f8458a17fe0c?raw)
