# Set row values

`PATCH /v1/databases/{databaseId}/rows`

Sets property values on one or many rows in one step: rowIds with set/unset applies the same values to every row; updates gives each row its own. Values are checked against the property type; unknown select options are added. Relation changes update the two-way side. uniqueId values are positive whole numbers: pass 12 or "LYD-12".

Scope: `docs:write`. Undoable.

## Request

```bash
curl -X PATCH "https://api.lydie.co/v1/databases/01JCQ3V5MZ8G4ZK2X7T9R6N1PB/rows" \
  -H "Authorization: Bearer $LYDIE_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{}'
```

## Path parameters

- `databaseId` (ULID, required)

## Body

- `rowIds` (ULID[], optional): (≤ 10000 items)
- `set` (object, optional): Default: `{}`.
- `unset` (ULID[], optional): Default: `[]`.
- `updates` (object[], optional): (≤ 10000 items)
  - `rowId` (ULID, required)
  - `set` (object, optional): Default: `{}`.
  - `unset` (ULID[], optional): Default: `[]`.
- `exact` (boolean, optional): Write the values as given: no type checks, no new options, no two-way relation updates. Undo uses it to restore earlier values exactly. Default: `false`.
- `newOptions` (object, optional): Options this call adds (recorded by the client so replays mint the same ids).

## Response

- `updated` (ULID[], required)

```json
{
  "updated": [
    "01JCQ3V5MZ8G4ZK2X7T9R6N1PB"
  ]
}
```

Errors use the envelope described at https://developers.lydie.co/errors.md.
