# PATCH /apps/:app_id/tables/:table_key

**Resource:** [Apps](./apps.md)  
**MCP tool:** `update_app_table`  
**Scopes:** `apps:write`  
**Write operation:** yes

Change a table's name, columns or who sees which rows. For a table another app made (shared: true) or one of the workspace's spreadsheets, only this app's own field rules change (send columns with access on each), and for a shared table access "read" or "write". A change that removes a column, changes a column's type or removes a select option is refused unless confirm_drop is true, and then the stored values of the removed or retyped columns are deleted from every row.

## Parameters

| Name | In | Type | Required | Description |
|------|----|------|----------|-------------|
| `app_id` | path | string | yes | The app's id. |
| `table_key` | path | string | yes | The table's key (for example "follow_ups"), as shown by list_app_tables. |
| `name` | body | string | no | New on-screen name. |
| `columns` | body | array | no | The table's columns: a list of { key, label, type, options?, required? }. type is one of text, number, money, date, datetime, boolean, select, multi_select, file (one stored file), files (up to 20 stored files on one row, for example photos of a job), signature (a signature drawn on screen, kept with who signed and when), contact_ref, opportunity_ref, user_ref. select and multi_select need options (a list of short texts). Who may see and who may change each field: access: { view, edit }, each one of "everyone" (anyone the app is shared with, the default), "team" (workspace members only, never a client), "clients" (clients in their Client Portal only), "admins" (workspace admins only) or a list of version ids from list_app_audiences (only people given one of those versions). For example a price only the team may change: access: { edit: "team" }; an internal note clients must not see: access: { view: "team" }; an approval the client gives and the team only reads: access: { edit: "clients" }. Admins always see and change every field, and nobody can change a field they cannot see. On a table that keeps rows for a contact (portal_customer), one contact_ref column may say row_for: true: each row is then kept for the contact in that column, so picking a subcontractor on a booking gives that subcontractor the row (in their Client Portal or through a link sent with send_app_link). Send the whole new list. |
| `row_visibility` | body | string | no | "shared" (every team member with access sees every row), "own" (a member sees only rows they own; admins and shares marked can_see_all_rows see all) or "portal_customer" (each row belongs to one CRM contact; a client sees only their own contact's rows, the team sees all). |
| `access` | body | string | no | Only for a table another app made (shared: true): "read" makes this app read it only, "write" lets it add and change rows too. |
| `confirm_drop` | body | boolean | no | Required (true) when the change removes a column, changes a column's type or removes a select option. The stored values of removed and retyped columns are then deleted for every row. Without it such a change is refused and nothing changes. |
| `require_approval` | body | boolean | no | Optional. Set true to route this write into the approval queue for human review instead of executing it immediately (returns 202 + an approval_id). Works even when your key/token has permission to execute directly. |

## Request example

```bash
curl -X PATCH   "https://api.trustpager.com/functions/v1/api/v1/apps/:app_id/tables/:table_key"   -H "Authorization: Bearer YOUR_API_KEY"   -H "Content-Type: application/json"   -d '{"name":"...","columns":"...","row_visibility":"..."}'
```

---
Base URL: `https://api.trustpager.com/functions/v1/api/v1` — Auth: `Authorization: Bearer YOUR_API_KEY`