---
title: "Upload Product Image"
method: POST
path: "/v1/products/{product_id}/images"
tags: ["Products"]
---

# Upload Product Image

`POST /v1/products/{product_id}/images`

## Request

- Base URL: `http://localhost:8000`
- URL: `http://localhost:8000/v1/products/{product_id}/images`
- Auth: HTTP bearer

Upload an image for a product (appends at next position). Send as 'file' or 'image'.

## Path parameters

- `product_id` integer, required

## Headers

- `X-API-Key` string, nullable

## Response `201`

Successful Response

- ProductImageOut: Image metadata returned by the API (binary data served separately).
  - `id` integer, required
  - `image_filename` string, nullable
  - `image_content_type` string, nullable
  - `image_path` string, nullable
  - `source_url` string, nullable
  - `position` integer

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/rubenayla/apis/partle-api.md) · [All operations](https://skmtc.dev/rubenayla/apis/partle-api/llms.txt) · [OpenAPI document](https://skmtc.dev/rubenayla/apis/partle-api/revisions/628cce2acee5?raw)
