# Create a custom field

## Create a custom field

<mark style="color:green;">`POST`</mark> `https://{{accountSlug}}.myeshopbox.com/api/platform/v1/property`

This endpoint allows you to create a custom field.

#### Headers

| Name          | Type   | Description                                  |
| ------------- | ------ | -------------------------------------------- |
| Authorization | string | The Bearer token to grant access to the API. |

#### Request Body

| Name         | Type    | Description                                                                    |
| ------------ | ------- | ------------------------------------------------------------------------------ |
| label        | string  | It is the name with which the property will be identified.                     |
| internalName | string  | It is the unique name of the property.                                         |
| description  | string  | Short description of the property.                                             |
| isUnique     | boolean | It states whether the property is unique or not.                               |
| fieldType    | string  | It is the data type of property .                                              |
| options      | object  | Options are there, when the client selects`single_selects` or `multi_selects`. |
| scope        | object  | It is the name of the module to which property can be assigned.                |
| createdAt    | string  | Creation date and time.                                                        |
| updatedAt    | string  | Updated date and time.                                                         |

{% tabs %}
{% tab title="200 Custom field successfully created." %}

```
{
  "label": "style code",
  "internalName": "stylecode4",
  "description": "this is style code property",
  "isUnique": "yes",
  "fieldType": "multi_select",
  "options": [
    "rock",
    "classy",
    "bestseller"
  ],
  "scope": [
    "recall consignment",
    "product"
  ],
  "createdAt": "2020-01-11T08:21:37.549Z",
  "updatedAt": "2020-01-21T08:21:37.549Z"
}'
```

{% endtab %}
{% endtabs %}

{% tabs %}
{% tab title="curl" %}

```
curl --location --request POST 'http://localhost:8080/_ah/api/esb/v1/property' \
--header 'Content-Type: application/json' \
--header 'Authorization: ' \
--data-raw '{
  "accountSlug": "montecarlo",
  "label": "style code",
  "internalName": "stylecode4",
  "description": "this is style code property",
  "isUnique": "yes",
  "fieldType": "multi_select",
  "options": [
    "rock",
    "classy",
    "bestseller"
  ],
  "scope": [
    "recall consignment",
    "product"
  ],
  "createdAt": "2020-01-11T08:21:37.549Z",
  "updatedAt": "2020-01-21T08:21:37.549Z"
}'
```

{% endtab %}
{% endtabs %}
