---
title: "Update an attribute option"
method: PUT
path: "/catalog/attributes/{attributeId}/options/{optionId}"
tags: ["Admin Catalog: Attributes"]
---

# Update an attribute option

`PUT /catalog/attributes/{attributeId}/options/{optionId}`

## Request

- Base URL: `http://localhost:8000/api/admin`
- URL: `http://localhost:8000/api/admin/catalog/attributes/{attributeId}/options/{optionId}`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/bagisto/apis/bagisto-admin-api/docs/catalog/attributes/:attributeId/options/:optionId/put.ts> (a function with typed inputs; its response is checked against the schema)

Partially updates the given option. Only supplied fields are changed; translations merge per-locale.

## Path parameters

- `attributeId` integer, required
- `optionId` integer, required

## Request body

- object
  - `admin_name` string
  - `sort_order` integer
  - `swatch_value` string, nullable
  - `swatch_alt` string, nullable
  - `swatch_file_name` string, nullable
  - `locale` string
  - `translations` object

## Response `200`

Option updated. Returns the full attribute detail.

## Other responses

- `400`: Invalid input
- `404`: Attribute or option not found.
- `422`: Validation Error

## Changes

- **2026-10-28** `3198f11be70f`: 3 info
  - added the new optional request property `locale`
  - added the new optional request property `swatch_alt`
  - added the new optional request property `swatch_file_name`

[Operation history](https://skmtc.dev/bagisto/apis/bagisto-admin-api/changes/catalog/attributes/:attributeId/options/:optionId/put.md)

---

[API](https://skmtc.dev/bagisto/apis/bagisto-admin-api.md) - [All operations](https://skmtc.dev/bagisto/apis/bagisto-admin-api/llms.txt) - [OpenAPI document](https://skmtc.dev/bagisto/apis/bagisto-admin-api/revisions/3198f11be70f?raw)
