> This page is for Developer.

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.bigcommerce.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.bigcommerce.com/_mcp/server.

# Create Product Variant Option

POST https://api.bigcommerce.com/stores/{store_hash}/v3/catalog/products/{product_id}/options
Content-Type: application/json

Creates a *Variant Option*.

**Required Fields**
* display_name
* type
* option_values

**Read-Only Fields**
* id

**Limits**
* 255 characters option name length.

**Notes**

* Only one variant option at a time can be created; individual variant options will contain an array of multiple values.
* There are several examples listed below that create options, but the SKUs are not updated and they are not a variant on the product. Variant SKUs must be created with a separate request.
* Variant options will show on the storefront as an option that can be selected by the customer. A request like this could be used to add new choices to a variant that has already been created.
* If more than one variant needs to be created, use the [Create a Product](/developer/api-reference/rest/admin/catalog/products/create-product) endpoint.

Reference: https://docs.bigcommerce.com/developer/api-reference/rest/admin/catalog/product-variant-options/create-product-variant-option

## Authentication

- `X-Auth-Token` header (required) — ### OAuth scopes | UI Name | Permission | Parameter | |:--------|:-----------|:----------| | Products | modify | `store_v2_products` | | Products | read-only | `store_v2_products_read_only` | ### Authentication header | Header | Argument | Description | |:-------|:---------|:------------| | `X-Auth-Token` | `access_token` | For more about API accounts that generate `access_token`s, see our [Guide to API Accounts](/developer/docs/overview/api-fundamentals/api-accounts#api-accounts). | ### Further reading For example requests and more information about authenticating BigCommerce APIs, see [Authentication and Example Requests](/developer/docs/overview/api-fundamentals/api-accounts#x-auth-token-header-example-requests). For more about BigCommerce OAuth scopes, see our [Guide to API Accounts](/developer/docs/overview/api-fundamentals/api-accounts#oauth-scopes). For a list of API status codes, see [API Status Codes](/developer/api-reference/rest/overview#rest-http-status-codes).

## Request

### Path parameters

- `product_id` (integer, required) — The ID of the `Product` to which the resource belongs.
- `store_hash` (string, required) — Permanent ID of the BigCommerce store.

### Headers

- `Accept` (string, required, default: application/json) — The [MIME type](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types) of the response body.

### Body (application/json)

This endpoint expects an object.

- `product_id` (integer, optional) — The unique numerical ID of the product to which the option belongs.
- `display_name` (string, optional) — The name of the option shown on the storefront.
- `type` (enum, optional) — The type of option, which determines how it will display on the storefront. Acceptable values: `radio_buttons`, `rectangles`, `dropdown`, `product_list`, `product_list_with_images`, `swatch`. For reference, the former v2 API values are: RB = radio_buttons, RT = rectangles, S = dropdown, P = product_list, PI = product_list_with_images, CS = swatch.
  - Allowed values: `radio_buttons`, `rectangles`, `dropdown`, `product_list`, `product_list_with_images`, `swatch`
- `config` (CatalogProductsProductIdOptionsPostRequestBodyContentApplicationJsonSchemaConfig, optional) — The values for option config can vary based on the Modifier created.
- `sort_order` (integer, optional) — Order in which the option is displayed on the storefront.
- `option_values` (list of CatalogProductsProductIdOptionsPostRequestBodyContentApplicationJsonSchemaOptionValuesItems, optional)
- `image_url` (string, optional) — Publicly available image url

## Response

### 200

OK

- `data` (CatalogProductsProductIdOptionsPostResponsesContentApplicationJsonSchemaData, optional) — Common Option properties.
- `meta` (CatalogProductsProductIdOptionsPostResponsesContentApplicationJsonSchemaMeta, optional) — Empty meta object; may be used later.

## Errors

### 409 Conflict Error

Option was in conflict with another option. This is the result of duplicate unique fields, such as `name`.

- `errors` (CatalogProductsProductIdOptionsPostResponsesContentApplicationJsonSchemaErrors, optional)
- `instance` (string, optional)
- `status` (integer, optional) — The HTTP status code.
- `title` (string, optional) — The error title describing the particular error.
- `type` (string, optional)

### 422 Unprocessable Entity Error

Option was not valid. This is the result of missing required fields, or of invalid data. See the response for more details.

- `errors` (CatalogProductsProductIdOptionsPostResponsesContentApplicationJsonSchemaErrors, optional)
- `instance` (string, optional)
- `status` (integer, optional) — The HTTP status code.
- `title` (string, optional) — The error title describing the particular error.
- `type` (string, optional)

## Types

### CatalogProductsProductIdOptionsPostRequestBodyContentApplicationJsonSchemaConfig

The values for option config can vary based on the Modifier created.

- `default_value` (string, optional) — (date, text, multi_line_text, numbers_only_text) The default value. Shown on a date option as an ISO-8601–formatted string, or on a text option as a string.
- `checked_by_default` (boolean, optional) — (checkbox) Flag for setting the checkbox to be checked by default.
- `checkbox_label` (string, optional) — (checkbox) Label displayed for the checkbox option.
- `date_limited` (boolean, optional) — (date) Flag to limit the dates allowed to be entered on a date option.
- `date_limit_mode` (enum, optional) — (date) The type of limit that is allowed to be entered on a date option.
  - Allowed values: `earliest`, `range`, `latest`
- `date_earliest_value` (datetime, optional) — (date) The earliest date allowed to be entered on the date option, as an ISO-8601 formatted string.
- `date_latest_value` (datetime, optional) — (date) The latest date allowed to be entered on the date option, as an ISO-8601 formatted string.
- `file_types_mode` (enum, optional) — (file) The kind of restriction on the file types that can be uploaded with a file upload option. Values: `specific` - restricts uploads to particular file types; `all` - allows all file types.
  - Allowed values: `specific`, `all`
- `file_types_supported` (list of string, optional) — (file) The type of files allowed to be uploaded if the `file_type_option` is set to `specific`. Values: `images` - Allows upload of image MIME types (`bmp`, `gif`, `jpg`, `jpeg`, `jpe`, `jif`, `jfif`, `jfi`, `png`, `wbmp`, `xbm`, `tiff`). `documents` - Allows upload of document MIME types (`txt`, `pdf`, `rtf`, `doc`, `docx`, `xls`, `xlsx`, `accdb`, `mdb`, `one`, `pps`, `ppsx`, `ppt`, `pptx`, `pub`, `odt`, `ods`, `odp`, `odg`, `odf`). `other` - Allows file types defined in the `file_types_other` array.
- `file_types_other` (list of string, optional) — (file) A list of other file types allowed with the file upload option.
- `file_max_size` (integer, optional) — (file) The maximum size for a file that can be used with the file upload option. This will still be limited by the server.
- `text_characters_limited` (boolean, optional) — (text, multi_line_text) Flag to validate the length of a text or multi-line text input.
- `text_min_length` (integer, optional) — (text, multi_line_text) The minimum length allowed for a text or multi-line text option.
- `text_max_length` (integer, optional) — (text, multi_line_text) The maximum length allowed for a text or multi line text option.
- `text_lines_limited` (boolean, optional) — (multi_line_text) Flag to validate the maximum number of lines allowed on a multi-line text input.
- `text_max_lines` (integer, optional) — (multi_line_text) The maximum number of lines allowed on a multi-line text input.
- `number_limited` (boolean, optional) — (numbers_only_text) Flag to limit the value of a number option.
- `number_limit_mode` (enum, optional) — (numbers_only_text) The type of limit on values entered for a number option.
  - Allowed values: `lowest`, `highest`, `range`
- `number_lowest_value` (double, optional) — (numbers_only_text) The lowest allowed value for a number option if `number_limited` is true.
- `number_highest_value` (double, optional) — (numbers_only_text) The highest allowed value for a number option if `number_limited` is true.
- `number_integers_only` (boolean, optional) — (numbers_only_text) Flag to limit the input on a number option to whole numbers only.
- `product_list_adjusts_inventory` (boolean, optional) — (product_list, product_list_with_images) Flag for automatically adjusting inventory on a product included in the list.
- `product_list_adjusts_pricing` (boolean, optional) — (product_list, product_list_with_images) Flag to add the optional product's price to the main product's price.
- `product_list_shipping_calc` (enum, optional) — (product_list, product_list_with_images) How to factor the optional product's weight and package dimensions into the shipping quote. Values: `none` - don't adjust; `weight` - use shipping weight only; `package` - use weight and dimensions.
  - Allowed values: `none`, `weight`, `package`

### CatalogProductsProductIdOptionsPostRequestBodyContentApplicationJsonSchemaOptionValuesItems

Common Option Value properties.

- `label` (string, required) — The text display identifying the value on the storefront. Required in a /POST.
- `sort_order` (integer, required) — The order in which the value will be displayed on the product page. Required in a /POST.
- `is_default` (boolean, optional) — The flag for preselecting a value as the default on the storefront. This field is not supported for swatch options/modifiers.
- `value_data` (CatalogProductsProductIdOptionsPostRequestBodyContentApplicationJsonSchemaOptionValuesItemsValueData, optional) — Extra data describing the value, based on the type of option or modifier with which the value is associated. The `swatch` type option can accept an array of `colors`, with up to three hexidecimal color keys; or an `image_url`, which is a full image URL path including protocol. The `product list` type option requires a `product_id`. The `checkbox` type option requires a boolean flag, called `checked_value`, to determine which value is considered to be the checked state.
- `id` (integer, optional) — The unique numeric ID of the value; increments sequentially.

### CatalogProductsProductIdOptionsPostResponsesContentApplicationJsonSchemaData

Common Option properties.

- `id` (integer, optional) — The unique numerical ID of the option, increments sequentially.
- `product_id` (integer, optional) — The unique numerical ID of the product to which the option belongs.
- `display_name` (string, optional) — The name of the option shown on the storefront.
- `type` (enum, optional) — The type of option, which determines how it will display on the storefront. Acceptable values: `radio_buttons`, `rectangles`, `dropdown`, `product_list`, `product_list_with_images`, `swatch`. For reference, the former v2 API values are: RB = radio_buttons, RT = rectangles, S = dropdown, P = product_list, PI = product_list_with_images, CS = swatch.
  - Allowed values: `radio_buttons`, `rectangles`, `dropdown`, `product_list`, `product_list_with_images`, `swatch`
- `config` (CatalogProductsProductIdOptionsPostResponsesContentApplicationJsonSchemaDataConfig, optional) — The values for option config can vary based on the Modifier created.
- `sort_order` (integer, optional) — Order in which the option is displayed on the storefront.
- `option_values` (list of CatalogProductsProductIdOptionsPostResponsesContentApplicationJsonSchemaDataOptionValuesItems, optional)
- `image_url` (string, optional) — Publicly available image url
- `name` (string, optional) — The unique option name, auto-generated from the display name, a timestamp, and the product ID.

### CatalogProductsProductIdOptionsPostResponsesContentApplicationJsonSchemaMeta

Empty meta object; may be used later.

### CatalogProductsProductIdOptionsPostResponsesContentApplicationJsonSchemaErrors

### CatalogProductsProductIdOptionsPostRequestBodyContentApplicationJsonSchemaOptionValuesItemsValueData

Extra data describing the value, based on the type of option or modifier with which the value is associated. The `swatch` type option can accept an array of `colors`, with up to three hexidecimal color keys; or an `image_url`, which is a full image URL path including protocol. The `product list` type option requires a `product_id`. The `checkbox` type option requires a boolean flag, called `checked_value`, to determine which value is considered to be the checked state.

### CatalogProductsProductIdOptionsPostResponsesContentApplicationJsonSchemaDataConfig

The values for option config can vary based on the Modifier created.

- `default_value` (string, optional) — (date, text, multi_line_text, numbers_only_text) The default value. Shown on a date option as an ISO-8601–formatted string, or on a text option as a string.
- `checked_by_default` (boolean, optional) — (checkbox) Flag for setting the checkbox to be checked by default.
- `checkbox_label` (string, optional) — (checkbox) Label displayed for the checkbox option.
- `date_limited` (boolean, optional) — (date) Flag to limit the dates allowed to be entered on a date option.
- `date_limit_mode` (enum, optional) — (date) The type of limit that is allowed to be entered on a date option.
  - Allowed values: `earliest`, `range`, `latest`
- `date_earliest_value` (datetime, optional) — (date) The earliest date allowed to be entered on the date option, as an ISO-8601 formatted string.
- `date_latest_value` (datetime, optional) — (date) The latest date allowed to be entered on the date option, as an ISO-8601 formatted string.
- `file_types_mode` (enum, optional) — (file) The kind of restriction on the file types that can be uploaded with a file upload option. Values: `specific` - restricts uploads to particular file types; `all` - allows all file types.
  - Allowed values: `specific`, `all`
- `file_types_supported` (list of string, optional) — (file) The type of files allowed to be uploaded if the `file_type_option` is set to `specific`. Values: `images` - Allows upload of image MIME types (`bmp`, `gif`, `jpg`, `jpeg`, `jpe`, `jif`, `jfif`, `jfi`, `png`, `wbmp`, `xbm`, `tiff`). `documents` - Allows upload of document MIME types (`txt`, `pdf`, `rtf`, `doc`, `docx`, `xls`, `xlsx`, `accdb`, `mdb`, `one`, `pps`, `ppsx`, `ppt`, `pptx`, `pub`, `odt`, `ods`, `odp`, `odg`, `odf`). `other` - Allows file types defined in the `file_types_other` array.
- `file_types_other` (list of string, optional) — (file) A list of other file types allowed with the file upload option.
- `file_max_size` (integer, optional) — (file) The maximum size for a file that can be used with the file upload option. This will still be limited by the server.
- `text_characters_limited` (boolean, optional) — (text, multi_line_text) Flag to validate the length of a text or multi-line text input.
- `text_min_length` (integer, optional) — (text, multi_line_text) The minimum length allowed for a text or multi-line text option.
- `text_max_length` (integer, optional) — (text, multi_line_text) The maximum length allowed for a text or multi line text option.
- `text_lines_limited` (boolean, optional) — (multi_line_text) Flag to validate the maximum number of lines allowed on a multi-line text input.
- `text_max_lines` (integer, optional) — (multi_line_text) The maximum number of lines allowed on a multi-line text input.
- `number_limited` (boolean, optional) — (numbers_only_text) Flag to limit the value of a number option.
- `number_limit_mode` (enum, optional) — (numbers_only_text) The type of limit on values entered for a number option.
  - Allowed values: `lowest`, `highest`, `range`
- `number_lowest_value` (double, optional) — (numbers_only_text) The lowest allowed value for a number option if `number_limited` is true.
- `number_highest_value` (double, optional) — (numbers_only_text) The highest allowed value for a number option if `number_limited` is true.
- `number_integers_only` (boolean, optional) — (numbers_only_text) Flag to limit the input on a number option to whole numbers only.
- `product_list_adjusts_inventory` (boolean, optional) — (product_list, product_list_with_images) Flag for automatically adjusting inventory on a product included in the list.
- `product_list_adjusts_pricing` (boolean, optional) — (product_list, product_list_with_images) Flag to add the optional product's price to the main product's price.
- `product_list_shipping_calc` (enum, optional) — (product_list, product_list_with_images) How to factor the optional product's weight and package dimensions into the shipping quote. Values: `none` - don't adjust; `weight` - use shipping weight only; `package` - use weight and dimensions.
  - Allowed values: `none`, `weight`, `package`

### CatalogProductsProductIdOptionsPostResponsesContentApplicationJsonSchemaDataOptionValuesItems

Common Option Value properties.

- `label` (string, required) — The text display identifying the value on the storefront. Required in a /POST.
- `sort_order` (integer, required) — The order in which the value will be displayed on the product page. Required in a /POST.
- `is_default` (boolean, optional) — The flag for preselecting a value as the default on the storefront. This field is not supported for swatch options/modifiers.
- `value_data` (CatalogProductsProductIdOptionsPostResponsesContentApplicationJsonSchemaDataOptionValuesItemsValueData, optional) — Extra data describing the value, based on the type of option or modifier with which the value is associated. The `swatch` type option can accept an array of `colors`, with up to three hexidecimal color keys; or an `image_url`, which is a full image URL path including protocol. The `product list` type option requires a `product_id`. The `checkbox` type option requires a boolean flag, called `checked_value`, to determine which value is considered to be the checked state.
- `id` (integer, optional) — The unique numeric ID of the value; increments sequentially.

### CatalogProductsProductIdOptionsPostResponsesContentApplicationJsonSchemaDataOptionValuesItemsValueData

Extra data describing the value, based on the type of option or modifier with which the value is associated. The `swatch` type option can accept an array of `colors`, with up to three hexidecimal color keys; or an `image_url`, which is a full image URL path including protocol. The `product list` type option requires a `product_id`. The `checkbox` type option requires a boolean flag, called `checked_value`, to determine which value is considered to be the checked state.

## Examples

### example-1

**Request**

```json
{}
```

**Response**

```json
{
  "data": {
    "id": 55,
    "product_id": 4,
    "display_name": "Add-a-$5-Donation1535042499-187",
    "type": "radio_buttons",
    "config": {
      "default_value": "string",
      "checked_by_default": true,
      "checkbox_label": "string",
      "date_limited": true,
      "date_limit_mode": "earliest",
      "date_earliest_value": "2022-08-24T00:00:00+00:00",
      "date_latest_value": "2022-08-27T00:00:00+00:00",
      "file_types_mode": "specific",
      "file_types_supported": [
        "images, documents, other"
      ],
      "file_types_other": [
        "pdf"
      ],
      "file_max_size": 5,
      "text_characters_limited": true,
      "text_min_length": 1,
      "text_max_length": 55,
      "text_lines_limited": true,
      "text_max_lines": 4,
      "number_limited": true,
      "number_limit_mode": "lowest",
      "number_lowest_value": 100,
      "number_highest_value": 0,
      "number_integers_only": false,
      "product_list_adjusts_inventory": true,
      "product_list_adjusts_pricing": true,
      "product_list_shipping_calc": "none"
    },
    "sort_order": 1,
    "option_values": [
      {
        "label": "Green",
        "sort_order": 0,
        "is_default": false,
        "value_data": {},
        "id": 0
      }
    ],
    "image_url": "string",
    "name": "Add-a-$5-Donation1535042499-187"
  },
  "meta": {}
}
```

**SDK Code**

```python example-1
import requests

url = "https://api.bigcommerce.com/stores/store_hash/v3/catalog/products/1/options"

payload = {}
headers = {
    "Accept": "application/json",
    "X-Auth-Token": "<apiKey>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript example-1
const url = 'https://api.bigcommerce.com/stores/store_hash/v3/catalog/products/1/options';
const options = {
  method: 'POST',
  headers: {
    Accept: 'application/json',
    'X-Auth-Token': '<apiKey>',
    'Content-Type': 'application/json'
  },
  body: '{}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go example-1
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.bigcommerce.com/stores/store_hash/v3/catalog/products/1/options"

	payload := strings.NewReader("{}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Accept", "application/json")
	req.Header.Add("X-Auth-Token", "<apiKey>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby example-1
require 'uri'
require 'net/http'

url = URI("https://api.bigcommerce.com/stores/store_hash/v3/catalog/products/1/options")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Accept"] = 'application/json'
request["X-Auth-Token"] = '<apiKey>'
request["Content-Type"] = 'application/json'
request.body = "{}"

response = http.request(request)
puts response.read_body
```

```java example-1
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.bigcommerce.com/stores/store_hash/v3/catalog/products/1/options")
  .header("Accept", "application/json")
  .header("X-Auth-Token", "<apiKey>")
  .header("Content-Type", "application/json")
  .body("{}")
  .asString();
```

```php example-1
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.bigcommerce.com/stores/store_hash/v3/catalog/products/1/options', [
  'body' => '{}',
  'headers' => [
    'Accept' => 'application/json',
    'Content-Type' => 'application/json',
    'X-Auth-Token' => '<apiKey>',
  ],
]);

echo $response->getBody();
```

```csharp example-1
using RestSharp;

var client = new RestClient("https://api.bigcommerce.com/stores/store_hash/v3/catalog/products/1/options");
var request = new RestRequest(Method.POST);
request.AddHeader("Accept", "application/json");
request.AddHeader("X-Auth-Token", "<apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift example-1
import Foundation

let headers = [
  "Accept": "application/json",
  "X-Auth-Token": "<apiKey>",
  "Content-Type": "application/json"
]
let parameters = [] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.bigcommerce.com/stores/store_hash/v3/catalog/products/1/options")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```

### example-2

**Request**

```json
{}
```

**Response**

```json
{
  "data": {
    "id": 220,
    "product_id": 192,
    "display_name": "Color",
    "type": "swatch",
    "config": {},
    "sort_order": 0,
    "option_values": [
      {
        "label": "Beige",
        "sort_order": 1,
        "is_default": false,
        "value_data": {
          "colors": [
            "#FAFAEB"
          ]
        },
        "id": 174
      },
      {
        "label": "Grey",
        "sort_order": 2,
        "is_default": false,
        "value_data": {
          "colors": [
            "#BDBDBD"
          ]
        },
        "id": 175
      },
      {
        "label": "Black",
        "sort_order": 3,
        "is_default": false,
        "value_data": {
          "colors": [
            "#000000"
          ]
        },
        "id": 176
      },
      {
        "label": "Black-Walnut",
        "sort_order": 4,
        "is_default": false,
        "value_data": {
          "colors": [
            "#e80ee8"
          ]
        },
        "id": 189
      }
    ],
    "name": "Color (Colors only)"
  },
  "meta": {}
}
```

**SDK Code**

```python example-2
import requests

url = "https://api.bigcommerce.com/stores/store_hash/v3/catalog/products/1/options"

payload = {}
headers = {
    "Accept": "application/json",
    "X-Auth-Token": "<apiKey>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript example-2
const url = 'https://api.bigcommerce.com/stores/store_hash/v3/catalog/products/1/options';
const options = {
  method: 'POST',
  headers: {
    Accept: 'application/json',
    'X-Auth-Token': '<apiKey>',
    'Content-Type': 'application/json'
  },
  body: '{}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go example-2
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.bigcommerce.com/stores/store_hash/v3/catalog/products/1/options"

	payload := strings.NewReader("{}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Accept", "application/json")
	req.Header.Add("X-Auth-Token", "<apiKey>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby example-2
require 'uri'
require 'net/http'

url = URI("https://api.bigcommerce.com/stores/store_hash/v3/catalog/products/1/options")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Accept"] = 'application/json'
request["X-Auth-Token"] = '<apiKey>'
request["Content-Type"] = 'application/json'
request.body = "{}"

response = http.request(request)
puts response.read_body
```

```java example-2
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.bigcommerce.com/stores/store_hash/v3/catalog/products/1/options")
  .header("Accept", "application/json")
  .header("X-Auth-Token", "<apiKey>")
  .header("Content-Type", "application/json")
  .body("{}")
  .asString();
```

```php example-2
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.bigcommerce.com/stores/store_hash/v3/catalog/products/1/options', [
  'body' => '{}',
  'headers' => [
    'Accept' => 'application/json',
    'Content-Type' => 'application/json',
    'X-Auth-Token' => '<apiKey>',
  ],
]);

echo $response->getBody();
```

```csharp example-2
using RestSharp;

var client = new RestClient("https://api.bigcommerce.com/stores/store_hash/v3/catalog/products/1/options");
var request = new RestRequest(Method.POST);
request.AddHeader("Accept", "application/json");
request.AddHeader("X-Auth-Token", "<apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift example-2
import Foundation

let headers = [
  "Accept": "application/json",
  "X-Auth-Token": "<apiKey>",
  "Content-Type": "application/json"
]
let parameters = [] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.bigcommerce.com/stores/store_hash/v3/catalog/products/1/options")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```