---
title: "Update an Attribute"
method: PATCH
path: "/attributes/{attribute_id}"
tags: ["Attributes"]
---

# Update an Attribute

`PATCH /attributes/{attribute_id}`

Update an Attribute by ID

## Path parameters

- `attribute_id` integer, required

## Request body

- AttributeUpdate
  - `archived` boolean — Whether or not the Attribute has been archived
  - `description` string — A short description of the Attribute
  - `key` string — Unique string identifier for this Attribute within the project
  - `name` string — The name of the Attribute

## Response `200`

Successfully updated the Attribute

- Attribute
  - `archived` boolean — Whether or not the Attribute has been archived
  - `condition_type` 'custom_attribute' | 'custom_dimension' — Whether this Attribute is a custom dimension or custom attribute. If this is a custom dimension, it belongs to an Optimizely Classic experiment and is read-only.
  - `description` string — A short description of the Attribute
  - `id` integer — The unique identifier for the Attribute
  - `key` string, required — Unique string identifier for this Attribute within the project
  - `last_modified` string, date-time — The last time the Attribute was modified
  - `name` string — The name of the Attribute. For Full Stack projects, the name will be set to the value of the key.
  - `project_id` integer, required — The ID of the project the Attribute belongs to

## Other responses

- `400` — Invalid request body content
- `401` — Invalid credentials
- `403` — You do not have permission to update the specified Attribute.
- `404` — Attribute not found
- `default` — Unexpected error

---

[API](https://skmtc.dev/optimizely/apis/optimizely-api.md) · [All operations](https://skmtc.dev/optimizely/apis/optimizely-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/optimizely/optimizely-api/revisions/5151fe6a2297/schema)
