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

# Create or replace item groups

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

Create item groups or replace the data of existing item groups. Returns an identifier for a background [task](/reference/v1-tasks-retrieve-task).

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "contact": {
      "email": "support@constructor.io"
    },
    "title": "Catalog management",
    "version": "0.1"
  },
  "servers": [
    {
      "url": "https://ac.cnstrc.com"
    }
  ],
  "security": [],
  "tags": [
    {
      "name": "Item groups"
    }
  ],
  "paths": {
    "/v2/item_groups": {
      "put": {
        "tags": [
          "Item groups"
        ],
        "operationId": "v2-item-groups-create-or-replace-item-groups",
        "summary": "Create or replace item groups",
        "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: `catalog(w)`.\n\nCreate item groups or replace the data of existing item groups. Returns an identifier for a background [task](/reference/v1-tasks-retrieve-task).",
        "parameters": [
          {
            "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": "c",
            "in": "query",
            "schema": {
              "title": "Client ID",
              "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
          },
          {
            "name": "force",
            "in": "query",
            "schema": {
              "title": "Force",
              "description": "A flag to process the catalog even if it will invalidate a large part of existing data. Defaults to `False`.",
              "examples": [
                false,
                true
              ],
              "type": "boolean"
            },
            "required": false
          },
          {
            "name": "notification_email",
            "in": "query",
            "schema": {
              "title": "Notification Email",
              "description": "The email address(es) to send a notification to if the task fails. Multiple addresses may be specified for multiple recipients.",
              "type": "array",
              "items": {
                "type": "string",
                "format": "email",
                "examples": [
                  "user@example.com"
                ]
              }
            },
            "required": false
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ItemGroupsListPutRequestBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ItemGroupsListPutResponse"
                }
              }
            }
          },
          "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."
          },
          "409": {
            "description": "Conflict"
          },
          "429": {
            "description": "Rate limit breached"
          }
        },
        "security": [
          {
            "http_basic_auth": []
          },
          {
            "http_bearer_auth": [
              "catalog(w)"
            ]
          }
        ]
      }
    }
  },
  "components": {
    "schemas": {
      "ItemGroupsListPutRequestBody": {
        "title": "ItemGroupsListPutRequestBody",
        "type": "object",
        "properties": {
          "item_groups": {
            "title": "Item Groups",
            "description": "Array of item groups you want to create or replace.",
            "minItems": 1,
            "maxItems": 10000,
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ItemGroup"
            }
          }
        },
        "required": [
          "item_groups"
        ]
      },
      "ItemGroup": {
        "title": "ItemGroup",
        "type": "object",
        "properties": {
          "data": {
            "title": "Data",
            "description": "Object containing additional data, that should be attached to this item group. The maximum size of data object is limited to 5kB. The average size of data objects for all ingested item groups should not exceed 1kB.",
            "type": "object"
          },
          "id": {
            "title": "Id",
            "description": "ID of the item group.",
            "examples": [
              "category-electronics",
              "group-123"
            ],
            "minLength": 1,
            "maxLength": 200,
            "type": "string"
          },
          "name": {
            "title": "Name",
            "description": "Item group display name.",
            "examples": [
              "Electronics",
              "Men's Clothing"
            ],
            "minLength": 1,
            "maxLength": 500,
            "type": "string"
          },
          "parent_ids": {
            "title": "Parent Ids",
            "description": "List of parent item group IDs",
            "type": "array",
            "items": {
              "type": "string",
              "examples": [
                "parent-1",
                "root"
              ]
            }
          }
        },
        "required": [
          "id",
          "name"
        ]
      },
      "ItemGroupsListPutResponse": {
        "title": "ItemGroupsListPutResponse",
        "type": "object",
        "properties": {
          "task_id": {
            "title": "Task ID",
            "type": "integer"
          },
          "task_status_path": {
            "title": "Task Status Path",
            "type": "string"
          }
        },
        "required": [
          "task_id",
          "task_status_path"
        ]
      }
    },
    "securitySchemes": {
      "http_basic_auth": {
        "type": "http",
        "scheme": "basic"
      },
      "http_bearer_auth": {
        "type": "http",
        "scheme": "bearer"
      }
    }
  },
  "x-readme": {
    "explorer-enabled": false
  }
}
```