---
title: "PATCH /api/database/tables/{table_id}/"
method: PATCH
path: "/api/database/tables/{table_id}/"
tags: ["Database tables"]
---

# PATCH /api/database/tables/{table_id}/

`PATCH /api/database/tables/{table_id}/`

Updates the existing table if the authorized user has access to the related database's workspace.

## Path parameters

- `table_id` integer, required

## Headers

- `ClientSessionId` string, uuid
- `ClientUndoRedoActionGroupId` string, uuid

## Request body

- PatchedTableUpdate
  - `name` string

## Response `200`

- Table
  - `id` integer, required
  - `name` string, required
  - `order` integer, required — Lowest first.
  - `database_id` integer, required
  - `data_sync` DataSync, required
    - `id` integer, required
    - `type` string, required
    - `table_id` integer, required — The table where the data is synced into.
    - `database_id` string, required
    - `synced_properties` DataSyncSyncedProperty[], required
      - `field_id` integer, required
      - `key` string, required — The matching `key` of the `DataSyncProperty`.
      - `unique_primary` boolean — Indicates whether the data sync property is used for unique identification when syncing.
    - `last_sync` string, date-time, nullable — Timestamp when the table was last synced.
    - `last_error` string, nullable
    - `auto_add_new_properties` boolean — If enabled and new properties are detected on sync, then they're automatically added. Note that this means all properties will always be added.
    - `delete_unmatched_rows` boolean — If enabled, rows that are no longer present in the source are deleted from the synced table on every sync. If disabled, those rows are kept and reused if the matching source row reappears.
    - `two_way_sync` boolean — If enabled, then it's possible to make changes to the synced table. They will automatically be synced with the source data. Note that this is only possible if the data sync type has a two-way sync strategy.

## Other responses

- `400`
- `404`

---

[API](https://skmtc.net/baserow/apis/baserow-api-spec.md) · [All operations](https://skmtc.net/baserow/apis/baserow-api-spec/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/baserow/baserow-api-spec/versions/0c490e5b0c7f/schema)
