Grist Octri Preview
PUT/docs/{docId}/tables/{tableId}/columns

Add or update table columns

Adds or updates columns in a table, creating a column when its id does not already exist. Supply each column's id and fields; use noadd, noupdate, or replaceall to control which changes are applied.

5 parameters · 1 body field
docIdstringrequired
The UUID of the document containing the table.
tableIdstringrequired
The normalized table name or numeric row ID in `_grist_Tables`.
noaddbooleanoptional
Set to true to prohibit adding columns.
noupdatebooleanoptional
Set to true to prohibit updating columns.
replaceallbooleanoptional
Set to true to remove existing columns, except hidden columns, that are not specified in the request body.

Columns to add or update. A column is updated when its id exists; otherwise, a new column is created.

columnsarray<object>required
Array of column objects, each containing an `id` and `fields` object.

1 status code
200Returns a success response after the columns are added or updated.

Error handling

The columns body field must be provided, and each column object must include id and fields. The docId path parameter must identify a document, and tableId must identify a table by its normalized name or numeric row ID.