# createAttributeValue (https://developer.godaddy.com/en/docs/references/rest/catalog/attribute/mutations/createAttributeValue)

***

title: createAttributeValue
description: "Create a new attribute value."
full: true
----------

mutation

Requires `commerce.product:write`.

Create a new attribute value.

## Required headers

| Header       | Required | Description                                                                                                                     |
| ------------ | -------- | ------------------------------------------------------------------------------------------------------------------------------- |
| `x-store-id` | Yes      | ID of the store the operation targets. Omitting it returns HTTP 200 with a GraphQL error: `extensions.code: "UNAUTHENTICATED"`. |

Go to [Authentication](https://developer.godaddy.com/docs/api-users/auth) for credential setup.

## Arguments

* `input` `CreateAttributeValueInput!` **required**
  * `attributeId` `String!` **required**
  * `label` `String!` **required**
  * `metafields` `[CreateMetafieldInput!]` **optional**
    * `key` `String!` **required**
    * `namespace` `String!` **required**
    * `type` `String!` **required** — Metafield value type. Live catalog validation accepts lowercase values such as `boolean`, `string`, `stringMultiLine`, `number`, `numberDecimal`, `date`, `dateTime`, `json`, `measurement`, `url`, `reference`, `money`, `list.string`, `list.number`, `list.numberDecimal`. Uppercase `STRING` is rejected.
    * `value` `String!` **required**
  * `name` `String` **optional**
  * `position` `Int` **optional**

## Possible returns

* `AttributeValue` `AttributeValue` — Value for an Attribute.

- `attribute` `Attribute` **nullable** — The attribute that this value belongs to.
- `createdAt` `DateTime!` **non-null** — The creation date of the Attribute Value.
- `id` `ID!` **non-null** — The UUID of the Attribute Value.
- `label` `String` **nullable** — The display label of the Attribute Value. E.g. 'Red', 'Blue', etc.
- `metafields` `AttributeValueMetafieldsConnection` **nullable**
- `name` `String!` **non-null** — A unique name of the Attribute Value. E.g. 'red', 'blue', etc.
- `position` `Int` **nullable** — The position of the attribute value.
- `updatedAt` `DateTime!` **non-null** — The last update date of the Attribute Value.
