> Source: https://wexa.ai/docs/data-tables/update-table-row

# update-table-row

[Can be held for approval](/docs/sdks-and-apis/how-every-tool-call-works#lifecycle-and-governance)

Change one row of a Data Table, addressed by its `row_id`. Only the keys present in `row` are written. Needs the `fabric:table.write` grant.

**Update a row**

**Wexa MCP server**

```bash
curl -sS -X POST https://fabric.wexa.ai/mcp/$FABRIC_PROJECT_ID \
  -H "authorization: Bearer $FABRIC_API_KEY" \
  -H "Mcp-Session-Id: $MCP_SESSION_ID" \
  -H "content-type: application/json" -H "accept: application/json" \
  -d '{"jsonrpc":"2.0","id":3,"method":"tools/call","params":{"name":"update-table-row","arguments":{"table_id":"6ab1944e7566f41b5c28e2eb","row_id":"6ab1945e7566f41b5c28e301","row":{"6ab1944eb6557622b2632872":"Acme"}}}}'
```

```json
{
  "content": [
    {
      "type": "text",
      "text": "{\"lifecycle_id\":\"qlc_000199\",\"result\":{\"table_id\":\"6ab1944e7566f41b5c28e2eb\",\"row_id\":\"6ab1945e7566f41b5c28e301\",\"result\":{\"_id\":\"6ab1945e7566f41b5c28e301\",\"row_id\":1,\"6ab1944eb6557622b2632872\":\"Acme\"}}}"
    }
  ],
  "isError": false
}
```

**REST API**

```bash
curl -sS https://fabric.wexa.ai/v1/update-table-row \
  -H "authorization: Bearer $FABRIC_API_KEY" \
  -H "content-type: application/json" \
  -d '{"table_id":"6ab1944e7566f41b5c28e2eb","row_id":"6ab1945e7566f41b5c28e301","row":{"6ab1944eb6557622b2632872":"Acme"}}'
```

```json
{
  "lifecycle_id": "qlc_000199",
  "result": {
    "table_id": "6ab1944e7566f41b5c28e2eb",
    "row_id": "6ab1945e7566f41b5c28e301",
    "result": {
      "_id": "6ab1945e7566f41b5c28e301",
      "row_id": 1,
      "6ab1944eb6557622b2632872": "Acme"
    }
  }
}
```

**TypeScript SDK**

```ts
import { Fabric } from '@wexa-fabric/sdk'

const fabric = new Fabric()
const result = await fabric.updateTableRow({
  table_id: '6ab1944e7566f41b5c28e2eb',
  row_id: '6ab1945e7566f41b5c28e301',
  row: { "6ab1944eb6557622b2632872": 'Acme' }
})
```

```ts
// result is the payload itself, with no `.result` to read
{
  table_id: '6ab1944e7566f41b5c28e2eb',
  row_id: '6ab1945e7566f41b5c28e301',
  result: {
    _id: '6ab1945e7566f41b5c28e301',
    row_id: 1,
    "6ab1944eb6557622b2632872": 'Acme'
  }
}
```

**Python SDK**

```python
from wexa import Fabric

fabric = Fabric()
out = fabric.update_table_row(
    table_id="6ab1944e7566f41b5c28e2eb",
    row_id="6ab1945e7566f41b5c28e301",
    row={"6ab1944eb6557622b2632872": "Acme"},
)
```

```python
# out is the result, already unwrapped
{
    "table_id": "6ab1944e7566f41b5c28e2eb",
    "row_id": "6ab1945e7566f41b5c28e301",
    "result": {
        "_id": "6ab1945e7566f41b5c28e301",
        "row_id": 1,
        "6ab1944eb6557622b2632872": "Acme"
    }
}
```

## Parameters

| Parameter | Type | Required | Notes |
| --- | --- | --- | --- |
| `table_id` | string | Required | Table id from `list-tables`, a 24-character hex id. A table in this project. |
| `row_id` | string | Required | The row's `_id` from `query-table-rows`, not its integer `row_id` field. A row in that table. |
| `row` | object | Required | Columns to change, keyed by `column_id` or `column_name` from `get-table`. A key that is neither is refused with the table's columns. At least one column. |

**Show full response**

A real response, captured from a live call to `update-table-row`:

**Result of update-table-row**

**REST API**

```json
{
  "lifecycle_id": "qlc_000199",
  "result": {
    "result": {
      "6ab1944e12917e3705beb0b9": true,
      "6ab1944e56ac670306c8deed": 120,
      "6ab1944eb6557622b2632872": "Acme",
      "_id": "6ab1945e7566f41b5c28e301",
      "coworker_user_id": "6a79a770b6c128ccc24bfca7",
      "row_id": 1
    },
    "row_id": "6ab1945e7566f41b5c28e301",
    "table_id": "6ab1944e7566f41b5c28e2eb"
  }
}
```

**TypeScript SDK**

```ts
// the object you get back IS the result — there is no `.result` to read
{
  result: {
    '6ab1944e12917e3705beb0b9': true,
    '6ab1944e56ac670306c8deed': 120,
    '6ab1944eb6557622b2632872': 'Acme',
    _id: '6ab1945e7566f41b5c28e301',
    coworker_user_id: '6a79a770b6c128ccc24bfca7',
    row_id: 1
  },
  row_id: '6ab1945e7566f41b5c28e301',
  table_id: '6ab1944e7566f41b5c28e2eb'
}

// The TS SDK names these camelCase — lifecycleId, traceId — where Python uses
// lifecycle_id and trace_id. Both are non-enumerable: readable, but omitted by
// Object.keys() and JSON.stringify(). `result.lifecycleId` here is undefined.
result.lifecycleId // 'qlc_000199'
```

**Python SDK**

```python
# a dict subclass; `result` is already unwrapped
{
 "result": {
  "6ab1944e12917e3705beb0b9": True,
  "6ab1944e56ac670306c8deed": 120,
  "6ab1944eb6557622b2632872": "Acme",
  "_id": "6ab1945e7566f41b5c28e301",
  "coworker_user_id": "6a79a770b6c128ccc24bfca7",
  "row_id": 1
 },
 "row_id": "6ab1945e7566f41b5c28e301",
 "table_id": "6ab1944e7566f41b5c28e2eb"
}

out.lifecycle_id  # 'qlc_000199' — an attribute, not a key
```

Every tool call works the same way: [How every tool call works](/docs/sdks-and-apis/how-every-tool-call-works).
