---
title: "Update a table"
method: PATCH
path: "/v1/tables/{tableId}"
tags: ["Tables"]
---

# Update a table

`PATCH /v1/tables/{tableId}`

## Request

- Base URL: `https://api.banksync.io`
- URL: `https://api.banksync.io/v1/tables/{tableId}`
- Auth: one of:
  - API key in header `X-API-Key`
  - HTTP bearer

Metadata only — name, icon, retention, default view, structure lock. Field changes are compare-and-set operations with their own endpoints, because letting one ride on an autosave-shaped PATCH is how two concurrent editors silently overwrite each other.

## Path parameters

- `tableId` string, required: Table ID

## Request body

- object
  - `name` string
  - `icon` string, nullable
  - `retention` union
    - object
      - `mode` 'forever', required
    - object
      - `mode` 'days', required
      - `days` integer, required
    - unknown
  - `structureLocked` boolean

## Response `200`

Table updated

- object
  - `success` true, required
  - `data` object, required
    - `id` string, required
    - `workspaceId` string, required
    - `name` string, required
    - `icon` string
    - `folderId` string, nullable, required
    - `position` integer, required
    - `kind` 'typed' | 'freeform', required
    - `resourceType` 'transactions' | 'balances' | 'trades' | 'holdings' | 'orders' | 'loans' | 'receipts' | 'invoices' | 'documents'
    - `contractVersion` integer
    - `singleton` true
    - `dedupFieldIds` string[], required
    - `promoted` object, required
      - `primary` string, required
      - `date` string
      - `amount` string
    - `nextNumber` integer
    - `schemaVersion` integer, required
    - `revision` integer, required
    - `structureLocked` boolean, required
    - `originAppId` string
    - `origin` object
      - `install` object
        - `id` string, required
        - `resourceKey` string, required
      - `listing` object
        - `id` string, required
        - `kind` string, required
        - `releaseId` string, required
      - `app` object
        - `id` string, required
      - `managed` string
      - `adoptedFrom` object
        - `managed` string
    - `retention` union
      - object
        - `mode` 'forever', required
      - object
        - `mode` 'days', required
        - `days` integer, required
    - `rowCount` integer, required
    - `attachmentBytes` integer, required
    - `createdBy` union, required
      - object
        - `kind` 'user', required
        - `userId` string, required
      - object
        - `kind` 'sync', required
        - `feedId` string, required
        - `jobId` string
        - `cause` object
          - `automationId` string, required
          - `runId` string, required
          - `depth` integer, required
          - `untrustedSender` true
      - object
        - `kind` 'extractor', required
        - `feedId` string, required
        - `jobId` string
        - `untrustedSender` true
      - object
        - `kind` 'import', required
        - `importId` string, required
        - `userId` string, required
      - object
        - `kind` 'api', required
        - `clientId` string, required
      - object
        - `kind` 'system', required
        - `reason` string, required
      - object
        - `kind` 'automation', required
        - `automationId` string, required
        - `revision` string, required
        - `grantId` string, required
        - `runId` string, required
        - `node` string, required
        - `startedBy` ActorRef, required (recursive)
        - `depth` integer, required
        - `untrustedSender` true
    - `createdAt` string, required
    - `updatedAt` string, required
    - `deletedAt` string
    - `fields` union[], required
      - union
        - object
          - `id` string, required
          - `tableId` string, required
          - `key` string, required
          - `label` string, required
          - `format` union
            - object
              - …
            - object
              - …
            - object
              - …
            - object
              - …
          - `position` integer, required
          - `contractFieldId` string
          - `required` boolean
          - `unique` boolean
          - `default` union
            - object
              - …
            - object
              - …
          - `icon` string
          - `description` string
          - `createdAt` string, required
          - `updatedAt` string, required
          - `deletedAt` string
          - `kind` 'text', required
          - `config` object
            - `suggestFrom` object
              - …
        - object
          - `id` string, required
          - `tableId` string, required
          - `key` string, required
          - `label` string, required
          - `format` union
            - object
              - …
            - object
              - …
            - object
              - …
            - object
              - …
          - `position` integer, required
          - `contractFieldId` string
          - `required` boolean
          - `unique` boolean
          - `default` union
            - object
              - …
            - object
              - …
          - `icon` string
          - `description` string
          - `createdAt` string, required
          - `updatedAt` string, required
          - `deletedAt` string
          - `kind` 'long_text', required
          - `config` object
        - object
          - `id` string, required
          - `tableId` string, required
          - `key` string, required
          - `label` string, required
          - `format` union
            - object
              - …
            - object
              - …
            - object
              - …
            - object
              - …
          - `position` integer, required
          - `contractFieldId` string
          - `required` boolean
          - `unique` boolean
          - `default` union
            - object
              - …
            - object
              - …
          - `icon` string
          - `description` string
          - `createdAt` string, required
          - `updatedAt` string, required
          - `deletedAt` string
          - `kind` 'number', required
          - `config` object
        - object
          - `id` string, required
          - `tableId` string, required
          - `key` string, required
          - `label` string, required
          - `format` union
            - object
              - …
            - object
              - …
            - object
              - …
            - object
              - …
          - `position` integer, required
          - `contractFieldId` string
          - `required` boolean
          - `unique` boolean
          - `default` union
            - object
              - …
            - object
              - …
          - `icon` string
          - `description` string
          - `createdAt` string, required
          - `updatedAt` string, required
          - `deletedAt` string
          - `kind` 'checkbox', required
          - `config` object
        - object
          - `id` string, required
          - `tableId` string, required
          - `key` string, required
          - `label` string, required
          - `format` union
            - object
              - …
            - object
              - …
            - object
              - …
            - object
              - …
          - `position` integer, required
          - `contractFieldId` string
          - `required` boolean
          - `unique` boolean
          - `default` union
            - object
              - …
            - object
              - …
          - `icon` string
          - `description` string
          - `createdAt` string, required
          - `updatedAt` string, required
          - `deletedAt` string
          - `kind` 'date', required
          - `config` object
        - object
          - `id` string, required
          - `tableId` string, required
          - `key` string, required
          - `label` string, required
          - `format` union
            - object
              - …
            - object
              - …
            - object
              - …
            - object
              - …
          - `position` integer, required
          - `contractFieldId` string
          - `required` boolean
          - `unique` boolean
          - `default` union
            - object
              - …
            - object
              - …
          - `icon` string
          - `description` string
          - `createdAt` string, required
          - `updatedAt` string, required
          - `deletedAt` string
          - `kind` 'datetime', required
          - `config` object
        - object
          - `id` string, required
          - `tableId` string, required
          - `key` string, required
          - `label` string, required
          - `format` union
            - object
              - …
            - object
              - …
            - object
              - …
            - object
              - …
          - `position` integer, required
          - `contractFieldId` string
          - `required` boolean
          - `unique` boolean
          - `default` union
            - object
              - …
            - object
              - …
          - `icon` string
          - `description` string
          - `createdAt` string, required
          - `updatedAt` string, required
          - `deletedAt` string
          - `kind` 'url', required
          - `config` object
        - object
          - `id` string, required
          - `tableId` string, required
          - `key` string, required
          - `label` string, required
          - `format` union
            - object
              - …
            - object
              - …
            - object
              - …
            - object
              - …
          - `position` integer, required
          - `contractFieldId` string
          - `required` boolean
          - `unique` boolean
          - `default` union
            - object
              - …
            - object
              - …
          - `icon` string
          - `description` string
          - `createdAt` string, required
          - `updatedAt` string, required
          - `deletedAt` string
          - `kind` 'email', required
          - `config` object
        - object
          - `id` string, required
          - `tableId` string, required
          - `key` string, required
          - `label` string, required
          - `format` union
            - object
              - …
            - object
              - …
            - object
              - …
            - object
              - …
          - `position` integer, required
          - `contractFieldId` string
          - `required` boolean
          - `unique` boolean
          - `default` union
            - object
              - …
            - object
              - …
          - `icon` string
          - `description` string
          - `createdAt` string, required
          - `updatedAt` string, required
          - `deletedAt` string
          - `kind` 'phone', required
          - `config` object
        - object
          - `id` string, required
          - `tableId` string, required
          - `key` string, required
          - `label` string, required
          - `format` union
            - object
              - …
            - object
              - …
            - object
              - …
            - object
              - …
          - `position` integer, required
          - `contractFieldId` string
          - `required` boolean
          - `unique` boolean
          - `default` union
            - object
              - …
            - object
              - …
          - `icon` string
          - `description` string
          - `createdAt` string, required
          - `updatedAt` string, required
          - `deletedAt` string
          - `kind` 'json', required
          - `config` object
        - object
          - `id` string, required
          - `tableId` string, required
          - `key` string, required
          - `label` string, required
          - `format` union
            - object
              - …
            - object
              - …
            - object
              - …
            - object
              - …
          - `position` integer, required
          - `contractFieldId` string
          - `required` boolean
          - `unique` boolean
          - `default` union
            - object
              - …
            - object
              - …
          - `icon` string
          - `description` string
          - `createdAt` string, required
          - `updatedAt` string, required
          - `deletedAt` string
          - `kind` 'created_time', required
          - `config` object
        - object
          - `id` string, required
          - `tableId` string, required
          - `key` string, required
          - `label` string, required
          - `format` union
            - object
              - …
            - object
              - …
            - object
              - …
            - object
              - …
          - `position` integer, required
          - `contractFieldId` string
          - `required` boolean
          - `unique` boolean
          - `default` union
            - object
              - …
            - object
              - …
          - `icon` string
          - `description` string
          - `createdAt` string, required
          - `updatedAt` string, required
          - `deletedAt` string
          - `kind` 'last_edited_time', required
          - `config` object
        - object
          - `id` string, required
          - `tableId` string, required
          - `key` string, required
          - `label` string, required
          - `format` union
            - object
              - …
            - object
              - …
            - object
              - …
            - object
              - …
          - `position` integer, required
          - `contractFieldId` string
          - `required` boolean
          - `unique` boolean
          - `default` union
            - object
              - …
            - object
              - …
          - `icon` string
          - `description` string
          - `createdAt` string, required
          - `updatedAt` string, required
          - `deletedAt` string
          - `kind` 'created_by', required
          - `config` object
        - object
          - `id` string, required
          - `tableId` string, required
          - `key` string, required
          - `label` string, required
          - `format` union
            - object
              - …
            - object
              - …
            - object
              - …
            - object
              - …
          - `position` integer, required
          - `contractFieldId` string
          - `required` boolean
          - `unique` boolean
          - `default` union
            - object
              - …
            - object
              - …
          - `icon` string
          - `description` string
          - `createdAt` string, required
          - `updatedAt` string, required
          - `deletedAt` string
          - `kind` 'last_edited_by', required
          - `config` object
        - object
          - `id` string, required
          - `tableId` string, required
          - `key` string, required
          - `label` string, required
          - `format` union
            - object
              - …
            - object
              - …
            - object
              - …
            - object
              - …
          - `position` integer, required
          - `contractFieldId` string
          - `required` boolean
          - `unique` boolean
          - `default` union
            - object
              - …
            - object
              - …
          - `icon` string
          - `description` string
          - `createdAt` string, required
          - `updatedAt` string, required
          - `deletedAt` string
          - `kind` 'single_select', required
          - `config` object, required
            - `options` object[], required
              - …
        - object
          - `id` string, required
          - `tableId` string, required
          - `key` string, required
          - `label` string, required
          - `format` union
            - object
              - …
            - object
              - …
            - object
              - …
            - object
              - …
          - `position` integer, required
          - `contractFieldId` string
          - `required` boolean
          - `unique` boolean
          - `default` union
            - object
              - …
            - object
              - …
          - `icon` string
          - `description` string
          - `createdAt` string, required
          - `updatedAt` string, required
          - `deletedAt` string
          - `kind` 'multi_select', required
          - `config` object, required
            - `options` object[], required
              - …
        - object
          - `id` string, required
          - `tableId` string, required
          - `key` string, required
          - `label` string, required
          - `format` union
            - object
              - …
            - object
              - …
            - object
              - …
            - object
              - …
          - `position` integer, required
          - `contractFieldId` string
          - `required` boolean
          - `unique` boolean
          - `default` union
            - object
              - …
            - object
              - …
          - `icon` string
          - `description` string
          - `createdAt` string, required
          - `updatedAt` string, required
          - `deletedAt` string
          - `kind` 'status', required
          - `config` object, required
            - `options` object[], required
              - …
        - object
          - `id` string, required
          - `tableId` string, required
          - `key` string, required
          - `label` string, required
          - `format` union
            - object
              - …
            - object
              - …
            - object
              - …
            - object
              - …
          - `position` integer, required
          - `contractFieldId` string
          - `required` boolean
          - `unique` boolean
          - `default` union
            - object
              - …
            - object
              - …
          - `icon` string
          - `description` string
          - `createdAt` string, required
          - `updatedAt` string, required
          - `deletedAt` string
          - `kind` 'rating', required
          - `config` object, required
            - `maximum` integer
            - `icon` 'star' | 'heart' | 'flag'
        - object
          - `id` string, required
          - `tableId` string, required
          - `key` string, required
          - `label` string, required
          - `format` union
            - object
              - …
            - object
              - …
            - object
              - …
            - object
              - …
          - `position` integer, required
          - `contractFieldId` string
          - `required` boolean
          - `unique` boolean
          - `default` union
            - object
              - …
            - object
              - …
          - `icon` string
          - `description` string
          - `createdAt` string, required
          - `updatedAt` string, required
          - `deletedAt` string
          - `kind` 'user', required
          - `config` object, required
            - `multiple` boolean
        - object
          - `id` string, required
          - `tableId` string, required
          - `key` string, required
          - `label` string, required
          - `format` union
            - object
              - …
            - object
              - …
            - object
              - …
            - object
              - …
          - `position` integer, required
          - `contractFieldId` string
          - `required` boolean
          - `unique` boolean
          - `default` union
            - object
              - …
            - object
              - …
          - `icon` string
          - `description` string
          - `createdAt` string, required
          - `updatedAt` string, required
          - `deletedAt` string
          - `kind` 'auto_number', required
          - `config` object, required
            - `prefix` string
            - `digits` integer
        - object
          - `id` string, required
          - `tableId` string, required
          - `key` string, required
          - `label` string, required
          - `format` union
            - object
              - …
            - object
              - …
            - object
              - …
            - object
              - …
          - `position` integer, required
          - `contractFieldId` string
          - `required` boolean
          - `unique` boolean
          - `default` union
            - object
              - …
            - object
              - …
          - `icon` string
          - `description` string
          - `createdAt` string, required
          - `updatedAt` string, required
          - `deletedAt` string
          - `kind` 'attachment', required
          - `config` object, required
            - `accept` 'any' | 'images' | 'documents'
        - object
          - `id` string, required
          - `tableId` string, required
          - `key` string, required
          - `label` string, required
          - `format` union
            - object
              - …
            - object
              - …
            - object
              - …
            - object
              - …
          - `position` integer, required
          - `contractFieldId` string
          - `required` boolean
          - `unique` boolean
          - `default` union
            - object
              - …
            - object
              - …
          - `icon` string
          - `description` string
          - `createdAt` string, required
          - `updatedAt` string, required
          - `deletedAt` string
          - `kind` 'relation', required
          - `config` object, required
            - `targetTableId` string, required
            - `cardinality` 'one' | 'many'
            - `linkFieldId` string, required
            - `partnerFieldId` string
            - `pickerCondition` union: A filter tree shared by tables, dashboards and widgets. A clause names a field by key (or one hop through a relation as `relation.field`), an operator, and a value; groups combine clauses with and / or / not.
              - …
            - `previewFieldIds` string[]
        - object
          - `id` string, required
          - `tableId` string, required
          - `key` string, required
          - `label` string, required
          - `format` union
            - object
              - …
            - object
              - …
            - object
              - …
            - object
              - …
          - `position` integer, required
          - `contractFieldId` string
          - `required` boolean
          - `unique` boolean
          - `default` union
            - object
              - …
            - object
              - …
          - `icon` string
          - `description` string
          - `createdAt` string, required
          - `updatedAt` string, required
          - `deletedAt` string
          - `kind` 'formula', required
          - `config` object, required
            - `languageVersion` 1
            - `source` string, required
            - `preset` union
              - …
          - `computed` object, required
            - `resultKind` object, required
              - …
            - `state` 'ready' | 'recalculating' | 'error', required
            - `error` 'division_by_zero' | 'invalid_value' | 'missing_reference' | 'type_mismatch' | 'complexity_limit' | 'depth_limit' | 'link_limit' | 'unavailable'
            - `volatile` boolean

## Other responses

- `400`: Validation failed, or a read-only field was written — `code` names the refusal and `details[]` the offending field or cell
- `401`: Unauthorized
- `403`: Forbidden — missing scope, insufficient role, or plan limit reached
- `404`: Not found
- `409`: Conflict — the table is locked, the schema or row version moved, a cell the patch writes was changed by another edit (`ROW_CELL_CONFLICT`, with each cell’s current value in `details`), or a relation accepts one row. `code` says which.

---

[API](https://skmtc.dev/banksync/apis/banksync-api.md) · [All operations](https://skmtc.dev/banksync/apis/banksync-api/llms.txt) · [OpenAPI document](https://skmtc.dev/banksync/apis/banksync-api/revisions/94465f5ee922?raw)
