---
title: "Rename a table or change its primary field"
description: "The id never changes, it is the column name and what every rule and page points at."
canonical: "https://gtable.app/docs/builder-api/tables/update"
updated: "2026-10-05"
---

# Rename a table or change its primary field

`PATCH https://studio.gtable.app/v1/apps/{appId}/tables/{tableId}`

The id never changes, it is the column name and what every rule and page points at.

The name is what people read.

Requires the `schema:write` scope. Operation `tables.update`. MCP tool `tables_update`. CLI, once published: `gtable tables update`.

## Path parameters

| Name      | Type   | Required | Description |
| --------- | ------ | -------- | ----------- |
| `appId`   | string | yes      |             |
| `tableId` | string | yes      |             |

## Headers

| Name              | Type   | Required | Description                                                                                                                                                                                                                                                        |
| ----------------- | ------ | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `Idempotency-Key` | string | no       | Any unique string. Sending the same key with the same request again returns the first response (marked `Idempotency-Replayed: true`) instead of running it twice. Reusing it for a different request is refused with 409. Kept for 24 hours. Up to 255 characters. |

## Request body

| Field            | Type   | Required | Description           |
| ---------------- | ------ | -------- | --------------------- |
| `name`           | string | no       | Up to 120 characters. |
| `plural`         | string | no       | Up to 120 characters. |
| `primaryFieldId` | string | no       |                       |
