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

# Rename a table, change its Studio icon or primary field

`PATCH https://studio.grid82.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. The icon is a Lucide name used only in the Studio; null restores the default table icon.

Requires the `schema:write` scope. Operation `tables.update`. MCP tool `tables_update`. CLI: `grid82 tables update` (`npx grid82`).

## 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 60 characters.  |
| `plural`         | string         | no       | Up to 120 characters. |
| `icon`           | string or null | no       |                       |
| `primaryFieldId` | string         | no       |                       |

**Authorizations**

- `Authorization` (bearer, in header, required)

## Response

**200**: Success

- `data` (`object`, required)
- `data.id` (`string`, required, pattern: `^[a-z][a-z0-9_]{0,62}$`)
- `data.name` (`string`, required, length: `1–120 chars`)
- `data.plural` (`string`, length: `1–120 chars`)
- `data.description` (`string`, length: `≤ 2000 chars`)
- `data.icon` (`string | null`)
- `data.primaryFieldId` (`string`, required, pattern: `^[a-z][a-z0-9_]{0,62}$`)
- `data.fields` (`object[]`, required, items: `1–200 items`)
- `data.fields.id` (`string`, required, pattern: `^[a-z][a-z0-9_]{0,62}$`)
- `data.fields.name` (`string`, required, length: `1–120 chars`)
- `data.fields.width` (`integer`, range: `60–900`)
- `data.fields.type` (`string`, required)
- `data.fields.config` (`object`, required, default: `{}`)

```json
{
  "data": {
    "id": "<string>",
    "name": "<string>",
    "plural": "<string>",
    "description": "<string>",
    "icon": "<string>",
    "primaryFieldId": "<string>",
    "fields": [
      {
        "id": "<string>",
        "name": "<string>",
        "width": 123,
        "type": "<string>",
        "config": {}
      }
    ]
  }
}
```

**4XX**: Refused

- `error` (`object`, required)
- `error.code` (`enum<string>`, required, one of: `not_found, forbidden, unauthenticated, validation_failed, conflict, rate_limited, payment_required, not_implemented, internal`)
- `error.message` (`string`, required)
- `error.details` (`Record<string, unknown>`)

```json
{
  "error": {
    "code": "not_found",
    "message": "<string>",
    "details": {}
  }
}
```

**Example request**

```bash
curl --request PATCH \
  --url 'https://studio.grid82.app/v1/apps/<appId>/tables/<tableId>' \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "name": "<string>",
  "plural": "<string>",
  "icon": "<string>",
  "primaryFieldId": "<string>"
}'
```
