Skip to main content
POST
/
admin
/
product-attributes
/
{id}
curl -X POST 'http://localhost:9000/admin/product-attributes/pattr_01HXYZABCDEF' \
  -H 'Authorization: Bearer <token>' \
  -H 'Content-Type: application/json' \
  -d '{"name": "Fabric", "is_filterable": true}'
{
  "product_attribute": {
    "id": "pattr_01HXYZABCDEF",
    "name": "Fabric",
    "handle": "material",
    "type": "single_select",
    "is_filterable": true,
    "updated_at": "2026-06-02T09:00:00.000Z"
  }
}
Updates the attribute’s details; only the provided fields are changed.
type is immutable — sending a type different from the attribute’s current type returns an error.

Path parameters

id
string
required
The attribute’s ID.

Body parameters

name
string
Attribute name.
handle
string
Unique URL-safe handle.
description
string
Attribute description.
type
string
Must match the current type: single_select, multi_select, unit, toggle, or text.
is_required
boolean
Whether a value is required on products.
is_filterable
boolean
Whether the attribute can be used as a storefront filter.
is_variant_axis
boolean
Whether the attribute drives variant generation; only valid for multi_select.
rank
number
Sort rank of the attribute; must be non-negative.
is_active
boolean
Whether the attribute is active.
category_ids
string[]
IDs of categories to link the attribute to; replaces the existing links.
metadata
object
Custom key-value data.
additional_data
object
Custom data passed to workflow hooks.

Response

product_attribute
object
curl -X POST 'http://localhost:9000/admin/product-attributes/pattr_01HXYZABCDEF' \
  -H 'Authorization: Bearer <token>' \
  -H 'Content-Type: application/json' \
  -d '{"name": "Fabric", "is_filterable": true}'
{
  "product_attribute": {
    "id": "pattr_01HXYZABCDEF",
    "name": "Fabric",
    "handle": "material",
    "type": "single_select",
    "is_filterable": true,
    "updated_at": "2026-06-02T09:00:00.000Z"
  }
}