> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mercurjs.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Update Product Attribute

> Update a catalog product attribute.

Updates the attribute's details; only the provided fields are changed.

> [!NOTE]
>
> `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`

**properties**

**id** `string`

The attribute's ID.

**name** `string`

Attribute name.

**handle** `string`

Unique URL-safe handle.

**type** `string`

The attribute's type.

**values** `object[]`

The attribute's values.

**categories** `object[]`

Linked categories with `id`, `name`, and `handle`.

**updated\_at** `string`

Last update timestamp.

```bash cURL theme={null}
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}'
```

```ts JS Client theme={null}
const { product_attribute } = await client.admin.productAttributes.$id.mutate({
  $id: "pattr_01HXYZABCDEF",
  name: "Fabric",
  is_filterable: true,
})
```

```json 200 theme={null}
{
  "product_attribute": {
    "id": "pattr_01HXYZABCDEF",
    "name": "Fabric",
    "handle": "material",
    "type": "single_select",
    "is_filterable": true,
    "updated_at": "2026-06-02T09:00:00.000Z"
  }
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.