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

# Update Data Item

`PATCH /collections/{collectionId}/items/{dataItemId}`

## Request

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

Update values for the specified item. The easiest way to accomplish is to modify the values in the response from Get Data Item 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
- `dataItemId` 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 Data Item

- 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)
