---
title: "Update Data Items"
method: PATCH
path: "/collections/{collectionId}/items"
tags: ["Data Item"]
---

# Update Data Items

`PATCH /collections/{collectionId}/items`

## Request

- Base URL: `https://data.lucid.app`
- URL: `https://data.lucid.app/collections/{collectionId}/items`
- Auth: OAuth 2
  - Authorization code: `https://lucid.app/oauth2/authorize`
  - Token URL: `https://api.lucid.co/oauth2/token` scopes: `data-service.admin`

This endpoint allows updating multiple data items at once. The easiest way to accomplish is to modify the values in the response from Get All Data Items and send a PATCH request. Changing the values will update existing data item values. The collection field is ignored as the data item cannot be moved to a different collection. It the new value is null, it means the value is deleted. If the provided field name does not exist in the collection schema, that value is ignored.

## Path parameters

- `collectionId` integer, required

## Request body

- object
  - `uri` string, required: URI of data item to be updated
  - `fields` object, required: Field value pairs to update data items from. Mapping is for a single data item

## Response `200`

OK with Array[Data Item] containing the updated data items

- object[]
  - `uri` string, required: Link to self
  - `collection` string, required: Link to the collection the item belongs to
  - `fields` object, required: Mapping of field names found in schema to this specific item's values

---

[API](https://skmtc.dev/lucid/apis/lucid-data-api.md) - [All operations](https://skmtc.dev/lucid/apis/lucid-data-api/llms.txt) - [OpenAPI document](https://skmtc.dev/lucid/apis/lucid-data-api/revisions/c14ed29dbeab?raw)
