> ## 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 Attribute Value

> Update a single value on a product attribute.

Updates the value and returns the parent attribute.

## Path parameters

**id** `string` *required*

The attribute's ID.

**value\_id** `string` *required*

The value's ID.

## Body parameters

**name** `string`

Value name.

**handle** `string`

Unique URL-safe handle.

**rank** `number`

Sort rank; must be non-negative.

**is\_active** `boolean`

Whether the value is active.

**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.

**type** `string`

The attribute's type.

**values** `object[]`

All values, including the updated one.

**updated\_at** `string`

Last update timestamp.

```bash cURL theme={null}
curl -X POST 'http://localhost:9000/admin/product-attributes/pattr_01HXYZABCDEF/values/pattrval_01HXYZABCDEF' \
  -H 'Authorization: Bearer <token>' \
  -H 'Content-Type: application/json' \
  -d '{"name": "Belgian Linen"}'
```

```ts JS Client theme={null}
const { product_attribute } =
  await client.admin.productAttributes.$id.values.$value_id.mutate({
    $id: "pattr_01HXYZABCDEF",
    $value_id: "pattrval_01HXYZABCDEF",
    name: "Belgian Linen",
  })
```

```json 200 theme={null}
{
  "product_attribute": {
    "id": "pattr_01HXYZABCDEF",
    "name": "Material",
    "type": "single_select",
    "values": [
      { "id": "pattrval_01HXYZABCDEF", "name": "Belgian Linen", "rank": 0 }
    ]
  }
}
```


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