update_table
Update a table’s name, description, or conditional background and text colors.
Parameters#
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
table_id | string | yes | The table id | |
name | string | no | New name | |
description | string | no | New description | |
coloring_rules | string | no | JSON array replacing all color rules; omit to preserve, [] to clear |
Read get_table first for existing coloring_rules, column IDs, and each column’s valid_operators. Rule conditions and targets use column IDs, rather than keys or display names. If coloring_rules_error is non-null, repair or remove invalid rules before resubmitting them; column deletion or type changes can invalidate saved rules.
[
{
"id": "high-spend",
"enabled": true,
"target": "columns",
"columnIds": ["col_spend"],
"background": "red",
"text": "red",
"conditions": {
"conjunction": "and",
"conditions": [
{"id": "spend-limit", "columnId": "col_spend", "operator": "gt", "value": 1000}
]
}
}
]Use target: "row" with columnIds: [] to color the entire row, or target: "columns" with one or more column IDs. Each rule needs a unique ID and at least one condition; condition IDs must be unique within a rule. Conditions support and or or; is_empty and is_not_empty need no value.
Set background, text, or both to gray, red, orange, yellow, green, blue, purple, or pink. Rules run in array order; the first matching rule that supplies a color wins for each property. Limits: 50 rules and 100 conditions total.
Returns#
The table schema, including saved coloring_rules — same shape as get_table.
Errors#
error_type | When |
|---|---|
auth_error | Missing / invalid API key |
invalid_request | No changes given, or an empty name |
invalid_coloring_rules | Invalid JSON, rule shape, colors, column references, operators, values, or limits |
not_found | Unknown, deleted, foreign-organization, or platform-managed table |