---
updatedAt: 2026-05-28T22:55:55.000Z
agentTools:
  projectIndex: https://docs.constructor.com/llms.txt
---

# Create or update facet options

**🔐 This endpoint requires [HTTP authentication](https://docs.constructor.com/reference/main-authentication) (either [Basic](https://docs.constructor.com/reference/main-authentication#basic-authentication) or [Bearer](https://docs.constructor.com/reference/main-authentication#bearer-authentication)).**
For authenticating with Bearer token, required scopes are: `facets(w)`.

Update a list of facet options with specified `value` for the given `facet_name`. If a facet option config with provided value already exists it is updated partially, otherwise it is created.

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "contact": {
      "email": "support@constructor.io"
    },
    "title": "Configuration",
    "version": "0.1"
  },
  "servers": [
    {
      "url": "https://ac.cnstrc.com"
    }
  ],
  "security": [],
  "tags": [
    {
      "name": "Facets"
    }
  ],
  "paths": {
    "/v1/facets/{facet_name}/options": {
      "patch": {
        "tags": [
          "Facets"
        ],
        "operationId": "v1-facet-options-create-or-update-facet-options",
        "summary": "Create or update facet options",
        "description": "**🔐 This endpoint requires [HTTP authentication](https://docs.constructor.com/reference/main-authentication) (either [Basic](https://docs.constructor.com/reference/main-authentication#basic-authentication) or [Bearer](https://docs.constructor.com/reference/main-authentication#bearer-authentication)).**\nFor authenticating with Bearer token, required scopes are: `facets(w)`.\n\nUpdate a list of facet options with specified `value` for the given `facet_name`. If a facet option config with provided value already exists it is updated partially, otherwise it is created.",
        "parameters": [
          {
            "name": "facet_name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "examples": [
                "Brand",
                "Color",
                "Price"
              ]
            }
          },
          {
            "name": "key",
            "in": "query",
            "schema": {
              "title": "Key",
              "description": "The key of the index to use.",
              "maxLength": 100,
              "minLength": 1,
              "examples": [
                "key_K2pX7vBnU0bgA5xp"
              ],
              "type": "string"
            },
            "required": true
          },
          {
            "name": "section",
            "in": "query",
            "schema": {
              "title": "Section",
              "description": "The section of the index to use. Defaults to `Products`.",
              "maxLength": 100,
              "minLength": 1,
              "examples": [
                "Products",
                "Search Suggestions"
              ],
              "type": "string"
            },
            "required": false
          },
          {
            "name": "c",
            "in": "query",
            "schema": {
              "title": "C",
              "description": "The ID of the client and version that the request is coming from, such as `cio-js-2.90`.",
              "maxLength": 100,
              "minLength": 1,
              "examples": [
                "cio-js-2.90",
                "cio-ios-1.0"
              ],
              "type": "string"
            },
            "required": false
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FacetOptionListPatchRequestBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FacetOptionListPatchResponse"
                }
              }
            }
          },
          "400": {
            "description": "Validation Error"
          },
          "401": {
            "description": "Credentials are not passed or action is forbidden."
          },
          "403": {
            "description": "The supplied token does not have the required permissions."
          },
          "404": {
            "description": "Not Found"
          },
          "429": {
            "description": "Rate limit breached"
          }
        },
        "security": [
          {
            "http_basic_auth": []
          },
          {
            "http_bearer_auth": [
              "facets(w)"
            ]
          }
        ]
      }
    }
  },
  "components": {
    "schemas": {
      "FacetOption": {
        "title": "FacetOption",
        "type": "object",
        "properties": {
          "value": {
            "title": "Value",
            "description": "A value for this facet option. Must be unique for particular facet.",
            "maxLength": 200,
            "examples": [
              "Red",
              "Blue"
            ],
            "type": "string"
          },
          "value_alias": {
            "title": "Value Alias",
            "description": "A value alias. It is used to merge several different but semantically similar facet options into one. For example, 'dark blue' and 'light blue' can be aliased to 'blue'.",
            "maxLength": 200,
            "examples": [
              "blue",
              "red"
            ],
            "type": "string"
          },
          "replace_value_alias": {
            "title": "Replace Value Alias",
            "description": "Determines the handling of a value alias when present. If set to `true`, exclusively considers the aliased value. If `false`, both the original and the aliased values are used.",
            "default": true,
            "examples": [
              true,
              false
            ],
            "type": "boolean"
          },
          "display_name": {
            "title": "Display Name",
            "description": "A display name for this facet option.",
            "maxLength": 200,
            "examples": [
              "Bright Red",
              "Navy Blue"
            ],
            "type": "string"
          },
          "position": {
            "title": "Position",
            "description": "Used to order facet options.",
            "examples": [
              1,
              5
            ],
            "type": "integer"
          },
          "data": {
            "title": "Data",
            "description": "Dictionary with any extra facet option data. Default value is `null`.",
            "examples": [
              {
                "hex": "#FF0000"
              },
              {
                "swatch_url": "http://example.com/swatch.png"
              }
            ],
            "type": "object"
          },
          "hidden": {
            "title": "Hidden",
            "description": "Specifies whether the facet option is hidden from users.",
            "default": false,
            "examples": [
              false,
              true
            ],
            "type": "boolean"
          }
        },
        "required": [
          "value"
        ],
        "additionalProperties": false
      },
      "FacetOptionListPatchRequestBody": {
        "title": "FacetOptionListPatchRequestBody",
        "description": "A list of facet options that should be updated.",
        "maxItems": 1000,
        "type": "array",
        "items": {
          "$ref": "#/components/schemas/FacetOption"
        },
        "additionalProperties": false
      },
      "FacetOptionListPatchResponse": {
        "title": "FacetOptionListPatchResponse",
        "description": "A list of facet options",
        "type": "array",
        "items": {
          "$ref": "#/components/schemas/FacetOption"
        },
        "additionalProperties": false
      }
    },
    "securitySchemes": {
      "http_basic_auth": {
        "type": "http",
        "scheme": "basic"
      },
      "http_bearer_auth": {
        "type": "http",
        "scheme": "bearer"
      }
    }
  },
  "x-readme": {
    "explorer-enabled": false
  }
}
```