What it does
Update part of a row. Null clears a column. edits changes part of a text cell without sending the whole value: find-and-replace as in patch_page, or append and prepend. With edits the response leaves the edited cells out of row.values and returns a few lines around each change. All or nothing: if one edit fails, nothing is written. This does not create a page version. The row's revision goes up when its values change, so a visitor edit drawn from the old revision is refused with a conflict.
Plans
Works on every plan: Free, Basic, Pro and Ultra.
Parameters
| Name | Type | About |
|---|---|---|
namerequired | string | The table. |
idrequired | string | The row's id. |
row | object | The columns to change. Columns you leave out keep their value; null clears one. |
edits | object | Text column key to a list of edits, applied in order: { find, replace, all?, expect_count?, match?: "exact" | "loose" }, or { append } or { prepend }. A column is set in row or edited here, not both. |
base_revision | integer | The row revision the change was drawn from. If the row has a different revision, nothing is written. |
site_id | string | Only for a site shared with you (whoami lists them): read or change that site's data as its member. |
Example
Call update_row with these arguments:
{
"name": "recipes",
"id": "01a1…",
"row": {
"minutes": 30
},
"edits": {
"steps": [
{
"find": "Simmer for 20 minutes.",
"replace": "Simmer for 25 minutes."
},
{
"append": "\nServe with bread."
}
]
}
}
Ids like 01a1… stand for your own. list_sites and list_tables give you the real ones.
Related guides
- Tables and columnsWhere your site's data lives, and who can read it.
- Load rowsFill a table in one go, without duplicates.
- Change part of a long textYour agent sends only the change, not the whole text.
- Photos and videos in tablesAdd photos and short videos to rows, from a form or through your agent.