---
title: "Upsert a product image or video"
method: PUT
path: "/unstable/product-media"
tags: ["Product Media"]
---

# Upsert a product image or video

`PUT /unstable/product-media`

## Request

- Base URL: `https://api.authentified.co`
- URL: `https://api.authentified.co/unstable/product-media`
- Auth: API key in header `X-Authentified-API-Key`

Upsert a product image or video

## Request body

- object
  - `id` string, required: The Unique Identifier of the image or video in your system
  - `productId` string, required: The Unique Identifier of the product this media belongs to
  - `src` string, uri, required: The URL of the image or video
  - `type` 'IMAGE' | 'VIDEO', required: The type of media
  - `alt` string: Alternative text for the image or video, used for accessibility and SEO
  - `width` number: Width of the image or video in pixels
  - `height` number: Height of the image or video in pixels
  - `createdAt` string, date-time: The date and time when the product image/video was created in your system
  - `updatedAt` string, date-time: The date and time when the product image/video was updated in your system

## Response `200`

Product media updated successfully

- object: Product media updated successfully
  - `id` string, required: The Unique Identifier of the image or video in your system
  - `productId` string, required: The Unique Identifier of the product this media belongs to
  - `src` string, uri, required: The URL of the image or video
  - `type` 'IMAGE' | 'VIDEO', required: The type of media
  - `alt` string: Alternative text for the image or video, used for accessibility and SEO
  - `width` number: Width of the image or video in pixels
  - `height` number: Height of the image or video in pixels
  - `createdAt` string, date-time: The date and time when the product image/video was created in your system
  - `updatedAt` string, date-time: The date and time when the product image/video was updated in your system

## Other responses

- `201`: Product media created successfully
- `400`: Bad Request - Invalid parameters
- `401`: Unauthorized - Invalid or missing API key
- `403`: Forbidden - API key does not have access to this resource

---

[API](https://skmtc.dev/authentified/apis/authentified-rest-api.md) - [All operations](https://skmtc.dev/authentified/apis/authentified-rest-api/llms.txt) - [OpenAPI document](https://skmtc.dev/authentified/apis/authentified-rest-api/revisions/1c72a50690bf?raw)
