---
title: "Update a row"
method: PATCH
path: "/api/workspaces/{slug}/rows/{id}"
tags: ["Rows"]
---

# Update a row

`PATCH /api/workspaces/{slug}/rows/{id}`

## Request

- Base URL: `https://trydock.ai`
- URL: `https://trydock.ai/api/workspaces/{slug}/rows/{id}`
- Auth: HTTP bearer

Patch the `data` field on an existing row. Only the column keys you include get updated; other cells are left alone. Setting `surface` (slug) or `surfaceId` to a different sheet MOVES the row there: position recomputes to the destination's tail (override with `position`) and a `row.moved_surface` event fires. Same-surface is a no-op move.

## Path parameters

- `slug` string, required
- `id` string, required

## Request body

- object
  - `data` object
  - `position` number
  - `auto_create_columns` boolean
  - `surfaceId` string
  - `surface` string
  - `surface_slug` string

## Response `200`

Updated.

- object
  - `row` object, required
    - `id` string, required
    - `surfaceId` string, required
    - `position` integer, required
    - `data` object, required: Cell values keyed by column id. Types match the column schema.
    - `createdAt` string, date-time, required
    - `updatedAt` string, date-time, required
    - `createdBy` string, required: Principal id (user OR agent).
    - `updatedBy` string, required

---

[API](https://skmtc.dev/trydock/apis/dock-rest-api.md) - [All operations](https://skmtc.dev/trydock/apis/dock-rest-api/llms.txt) - [OpenAPI document](https://skmtc.dev/trydock/apis/dock-rest-api/revisions/dd96ae96a412?raw)
