---
title: "Create an Attribute"
method: POST
path: "/attributes"
tags: ["Attributes"]
---

# Create an Attribute

`POST /attributes`

Create an Attribue

## Request body

- 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

## Response `201`

Successfully created 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
- `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)
