---
title: "Upsert a product metafield"
method: PUT
path: "/unstable/product-metafield"
tags: ["Product Metafield"]
---

# Upsert a product metafield

`PUT /unstable/product-metafield`

## Request

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

Upsert a product metafield

## Request body

- object
  - `id` string, required: The Unique Identifier of the metafield in your system
  - `productId` string, required: The Unique Identifier of the product this metafield belongs to
  - `namespace` string: The namespace of the metafield
  - `key` string, required: The key of the metafield
  - `value` string, required: The value of the metafield
  - `createdAt` string, date-time: The date and time when the product metafield was created in your system
  - `updatedAt` string, date-time: The date and time when the product metafield was updated in your system

## Response `200`

Product metafield updated successfully

- object: Product metafield updated successfully
  - `id` string, required: The Unique Identifier of the metafield in your system
  - `productId` string, required: The Unique Identifier of the product this metafield belongs to
  - `namespace` string: The namespace of the metafield
  - `key` string, required: The key of the metafield
  - `value` string, required: The value of the metafield
  - `createdAt` string, date-time: The date and time when the product metafield was created in your system
  - `updatedAt` string, date-time: The date and time when the product metafield was updated in your system

## Other responses

- `201`: Product metafield 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)
