---
title: "Add or update items in a collection"
method: PUT
path: "/v1/collections/{collection_id}/items"
tags: ["Collections"]
---

# Add or update items in a collection

`PUT /v1/collections/{collection_id}/items`

**🔐 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)`.

Add items to a collection, or update existing items. Items already in the collection are updated, others are added. Note that the total number of items per collection is limited, and the request will fail if adding items would exceed this limit.

## Path parameters

- `collection_id` string, required

## Query parameters

- `key` string, required — The key of the index to use.
- `section` string — The section of the index to use. Defaults to `Products`.
- `c` string — The ID of the client and version that the request is coming from, such as `cio-js-2.90`.
- `on_missing` 'IGNORE' | 'FAIL' | 'CREATE'

## Request body

- CollectionItemListPutBody
  - `items` CollectionItemBase[], required — A list of item IDs to add to the collection.
    - `id` string, required — The ID of the item, must be unique.
    - `source` string — Arbitrary identifier of the source of the item manually added to the collection.
    - `variation_ids` string[] — List of variation IDs to include in this collection for the item. If not provided, all variations of the item are included.

## Response `200`

OK

- CollectionItemListPutResponse
  - `items` CollectionItemResponse[], required
    - `id` string, required — The ID of the item, added to the collection.
    - `source` string — Arbitrary identifier of the source of the item manually added to the collection.
    - `variation_ids` string[] — List of variation IDs to include in this collection for the item. If not provided, all variations of the item are included.
    - `created_at` string, date-time — Collection Item creation date in ISO 8601 format. Present only for manually added items.
    - `updated_at` string, date-time — Collection Item update date in ISO 8601 format. Present only for manually added items.
    - `type` 'manual' | 'dynamic'

## Other responses

- `400` — Validation Error
- `401` — Credentials are not passed or action is forbidden.
- `403` — The supplied token does not have the required permissions.
- `404` — Not Found
- `429` — Rate limit breached

---

[API](https://skmtc.net/constructor/apis/autocomplete.md) · [All operations](https://skmtc.net/constructor/apis/autocomplete/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/constructor/autocomplete/versions/2d33330633b6/schema)
