---
title: "Update a List Attribute"
method: PATCH
path: "/list_attributes/{list_attribute_id}"
tags: ["List Attributes"]
---

# Update a List Attribute

`PATCH /list_attributes/{list_attribute_id}`

Overwrite the List Attribute with the provided id. Required arguments are identical to creating a new List Attribute.

## Path parameters

- `list_attribute_id` integer, required

## Request body

- ListAttributeUpdate
  - `archived` boolean — Whether or not the List Attribute has been archived
  - `description` string — A short description of the List Attribute
  - `key_field` string — The name of the object which holds targeting ids on your website
  - `list_content` string — A comma separated string of IDs or ZIP Codes. Items will be matched against the key_field to determine if an active visitor should be targeted by the list. Note that if the list currently contains data, providing this value will overwrite the previous data.
  - `list_type` 'cookies' | 'query_parameters' | 'zip_codes' | 'js_variables' — The type of data object which holds targeting ids on your website (cookies, query parameters, zip codes, Global JS variables)
  - `name` string — A unique, human-readable name for the List Attribute

## Response `200`

Successfully updated the List Attribute

- ListAttribute
  - `account_id` integer — The unique identifier for the Optimizely account
  - `archived` boolean — Whether or not the List Attribute has been archived
  - `aws_access_key` string — AWS access key to upload List Attribute source file to S3
  - `aws_secret_key` string — AWS secret key to upload List Attribute source file to S3
  - `created` string, date-time — Time when the List Attribute was created
  - `description` string — A short description of the List Attribute
  - `id` integer — The unique identifier for the List Attribute
  - `key_field` string, required — The name of the object which holds targeting ids on your website
  - `last_modified` string, date-time — The last time the List Attribute was modified
  - `list_content` string — A comma separated string of IDs or ZIP Codes. Items will be matched against the key_field to determine if an active visitor should be targeted by the list. Note that if the list currently contains data, providing this value will overwrite the previous data.
  - `list_type` 'cookies' | 'query_parameters' | 'zip_codes' | 'js_variables' — The type of data object which holds targeting ids on your website (cookies, query parameters, zip codes, Global JS variables)
  - `name` string, required — A unique, human-readable name for the List Attribute
  - `project_id` integer, required — The ID of the project the List Attribute belongs to
  - `s3_path` string — S3 path containing files used to populate the List Attribute with data. Can be used with an S3 client or CLI to upload data.

## Other responses

- `400` — Invalid request body content
- `401` — Invalid credentials
- `403` — You do not have permission to update the specified List Attribute.
- `404` — List 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)
