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

# Update collection

**🔐 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: `collections(w)`.

Update a collection. Data sent through the request body will be merged with existing collection. Validation will be performed over the merged collection.

# 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": "Collections"
    }
  ],
  "paths": {
    "/v1/collections/{collection_id}": {
      "patch": {
        "tags": [
          "Collections"
        ],
        "operationId": "v1-collections-update-collection",
        "summary": "Update collection",
        "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: `collections(w)`.\n\nUpdate a collection. Data sent through the request body will be merged with existing collection. Validation will be performed over the merged collection.",
        "parameters": [
          {
            "name": "collection_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "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/CollectionPatchBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CollectionPatchResponse"
                }
              }
            }
          },
          "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"
          },
          "409": {
            "description": "Conflict"
          },
          "429": {
            "description": "Rate limit breached"
          }
        },
        "security": [
          {
            "http_basic_auth": []
          },
          {
            "http_bearer_auth": [
              "collections(w)"
            ]
          }
        ]
      }
    }
  },
  "components": {
    "schemas": {
      "DictOrJsonStringWithDict": {
        "title": "DictOrJsonStringWithDict",
        "anyOf": [
          {
            "type": "object",
            "title": "object"
          },
          {
            "type": "string",
            "format": "json",
            "title": "Encoded JSON string"
          }
        ]
      },
      "CollectionMatchType": {
        "title": "CollectionMatchType",
        "enum": [
          "EXACT",
          "UNORDERED",
          "PHRASE"
        ],
        "type": "string"
      },
      "CollectionMatchResponse": {
        "title": "CollectionMatchResponse",
        "type": "object",
        "properties": {
          "pattern": {
            "title": "Pattern",
            "description": "A term to associate with this collection for matching purposes.",
            "examples": [
              "summer sale",
              "black friday deals"
            ],
            "minLength": 1,
            "maxLength": 255,
            "type": "string"
          },
          "match_type": {
            "description": "The type of match to perform.",
            "default": "PHRASE",
            "examples": [
              "PHRASE",
              "EXACT"
            ],
            "allOf": [
              {
                "$ref": "#/components/schemas/CollectionMatchType"
              }
            ]
          }
        },
        "required": [
          "pattern"
        ],
        "additionalProperties": false
      },
      "CollectionMatch": {
        "title": "CollectionMatch",
        "type": "object",
        "properties": {
          "pattern": {
            "title": "Pattern",
            "description": "A term to associate with this collection for matching purposes.",
            "examples": [
              "summer sale",
              "black friday deals"
            ],
            "minLength": 1,
            "maxLength": 255,
            "type": "string"
          },
          "match_type": {
            "description": "The type of match to perform.",
            "default": "PHRASE",
            "examples": [
              "PHRASE",
              "EXACT"
            ],
            "allOf": [
              {
                "$ref": "#/components/schemas/CollectionMatchType"
              }
            ]
          }
        },
        "required": [
          "pattern"
        ],
        "additionalProperties": false
      },
      "CollectionPatchBody": {
        "title": "CollectionPatchBody",
        "type": "object",
        "properties": {
          "id": {
            "title": "Id",
            "description": "ID of the collection, must be unique.",
            "examples": [
              "summer-sale",
              "halloween-baking-mixes"
            ],
            "minLength": 1,
            "maxLength": 100,
            "type": "string"
          },
          "display_name": {
            "title": "Display Name",
            "description": "Name of the collection to be displayed to end users.",
            "examples": [
              "Summer Sale",
              "Halloween Baking Mixes"
            ],
            "minLength": 1,
            "maxLength": 100,
            "type": "string"
          },
          "filter_expression": {
            "title": "Filter expression",
            "description": "[Filter expression](/reference/shared-filter-expressions) associated with this collection.",
            "examples": [
              {
                "name": "brand",
                "value": "Nike"
              },
              {
                "and": [
                  {
                    "name": "price",
                    "range": [
                      10,
                      100
                    ]
                  },
                  {
                    "name": "color",
                    "value": "red"
                  }
                ]
              }
            ],
            "allOf": [
              {
                "$ref": "#/components/schemas/DictOrJsonStringWithDict"
              }
            ]
          },
          "data": {
            "title": "Data",
            "description": "Object containing additional data, that should be attached to this collection. The maximum size of data object is limited to 200kb. ",
            "examples": [
              {
                "key": "value"
              },
              {
                "promo_code": "SUMMER20"
              }
            ],
            "type": "object"
          },
          "discoverable": {
            "title": "Discoverable",
            "description": "When true, the collection is discoverable in autocomplete and search.",
            "default": false,
            "examples": [
              false,
              true
            ],
            "type": "boolean"
          },
          "matches": {
            "title": "Matches",
            "description": "A list of terms associated with this collection for matching purposes.",
            "maxItems": 50,
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CollectionMatch"
            }
          },
          "start_time": {
            "title": "Start Time",
            "description": "ISO-8601 string in UTC defining start time when the collection becomes active. Any specified timezone will be omitted.",
            "examples": [
              "2025-12-10T10:00:00"
            ],
            "type": "string",
            "format": "date-time"
          },
          "end_time": {
            "title": "End Time",
            "description": "ISO-8601 string in UTC defining start time when the collection becomes inactive. Any specified timezone will be omitted.",
            "examples": [
              "2025-12-31T23:59:59"
            ],
            "type": "string",
            "format": "date-time"
          },
          "overridden_collection_id": {
            "title": "Overridden Collection ID",
            "description": "The ID of the base collection that this collection overrides. An overriding collection temporarily replaces the content of a base collection during a scheduled time window. Only base collections (collections with `overridden_collection_id` set to `null`) can be overridden.",
            "examples": [
              "overridden-collection",
              "sales"
            ],
            "minLength": 1,
            "maxLength": 100,
            "type": "string"
          }
        },
        "additionalProperties": false
      },
      "CollectionPatchResponse": {
        "title": "CollectionPatchResponse",
        "type": "object",
        "properties": {
          "id": {
            "title": "ID",
            "description": "ID of the collection.",
            "minLength": 1,
            "maxLength": 100,
            "type": "string"
          },
          "display_name": {
            "title": "Display Name",
            "description": "Name of the collection to be displayed to end users.",
            "examples": [
              "Summer Sale",
              "Halloween Baking Mixes"
            ],
            "minLength": 1,
            "maxLength": 100,
            "type": "string"
          },
          "filter_expression": {
            "title": "Filter expression",
            "description": "[Filter expression](/reference/shared-filter-expressions) associated with this collection.",
            "examples": [
              {
                "name": "brand",
                "value": "Nike"
              },
              {
                "and": [
                  {
                    "name": "price",
                    "range": [
                      10,
                      100
                    ]
                  },
                  {
                    "name": "color",
                    "value": "red"
                  }
                ]
              }
            ],
            "allOf": [
              {
                "$ref": "#/components/schemas/DictOrJsonStringWithDict"
              }
            ]
          },
          "data": {
            "title": "Data",
            "description": "Object containing additional data, that should be attached to this collection. The maximum size of data object is limited to 200kb. ",
            "examples": [
              {
                "key": "value"
              },
              {
                "promo_code": "SUMMER20"
              }
            ],
            "type": "object"
          },
          "discoverable": {
            "title": "Discoverable",
            "description": "When true, the collection is discoverable in autocomplete and search.",
            "default": false,
            "examples": [
              false,
              true
            ],
            "type": "boolean"
          },
          "matches": {
            "title": "Matches",
            "description": "A list of terms associated with this collection for matching purposes.",
            "maxItems": 50,
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CollectionMatchResponse"
            }
          },
          "start_time": {
            "title": "Start Time",
            "description": "ISO-8601 string in UTC defining start time when the collection becomes active. Any specified timezone will be omitted.",
            "type": "string",
            "format": "date-time"
          },
          "end_time": {
            "title": "End Time",
            "description": "ISO-8601 string in UTC defining start time when the collection becomes inactive. Any specified timezone will be omitted.",
            "type": "string",
            "format": "date-time"
          },
          "overridden_collection_id": {
            "title": "Overridden Collection ID",
            "description": "The ID of the base collection that this collection overrides. An overriding collection temporarily replaces the content of a base collection during a scheduled time window. Only base collections (collections with `overridden_collection_id` set to `null`) can be overridden.",
            "minLength": 1,
            "maxLength": 100,
            "type": "string"
          },
          "created_at": {
            "title": "Created At",
            "description": "Collection creation date in ISO 8601 format. Present only for manually added collections.",
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "title": "Updated At",
            "description": "Last collection update date in ISO 8601 format. Present only for manually added collections.",
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "display_name",
          "created_at"
        ],
        "additionalProperties": false
      }
    },
    "securitySchemes": {
      "http_basic_auth": {
        "type": "http",
        "scheme": "basic"
      },
      "http_bearer_auth": {
        "type": "http",
        "scheme": "bearer"
      }
    }
  },
  "x-readme": {
    "explorer-enabled": false
  }
}
```