# Update table

`PATCH https://api.airtable.com/v0/meta/bases/{baseId}/tables/{tableIdOrName}`

Updates the name, description, and/or date dependency settings of a table.

## Requirements

- **Authentication:** [Personal access token](https://airtable.com/developers/web/api/authentication.md#types-of-token), [OAuth integration](https://airtable.com/developers/web/api/authentication.md#types-of-token)
- **Scope:** [`schema.bases:write`](https://airtable.com/developers/web/api/scopes.md#schema-bases-write)
- **User role:** Base creator
- **Billing plans:** All plans

## Path parameters

- `baseId: string`

- `tableIdOrName: string`

## Request body

- `dateDependencySettings: Date-Dependency-Settings` — optional

  The date dependency settings for the table (optional).

- `description: string` — optional

  The new description for the table (optional). If present, must be a string no longer than 20,000 characters.

- `name: string` — optional

  The new name for the table (optional).

## Response format

- `id: string` — required

- `primaryFieldId: string` — required

  The first column in the table and every view.

- `dateDependencySettings: Date-Dependency-Settings` — optional

  The date dependency settings for the table, if they exist.

- `name: string` — required

- `description: string` — optional

- `fields: array<object>` — required

  - `id: string` — required

  - `type: Field-Type` — optional

  - `name: string` — required

  - `description: string` — optional

  - `options: unknown` — optional

- `views: array<object>` — required

  - `id: string` — required

  - `type: "grid" | "form" | "calendar" | "gallery" | "kanban" | "timeline" | "block"` — required

    View type, `block` is Gantt View

  - `name: string` — required

  - `visibleFieldIds: array<string>` — optional

    Available on `grid` views only: list of visible (non-hidden) field IDs, when requested with `include` query paremeter

### Example — Success response

```sh
curl -X PATCH "https://api.airtable.com/v0/meta/bases/{baseId}/tables/{tableIdOrName}" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
--data '{
    "description": "I was changed!",
    "name": "Apartments (revised)"
  }'
```

```json
{
  "description": "I was changed!",
  "fields": [
    {
      "id": "fld1VnoyuotSTyxW1",
      "name": "Name",
      "type": "singleLineText"
    },
    {
      "id": "fldoi0c3GaRQJ3xnI",
      "name": "Address",
      "type": "singleLineText"
    },
    {
      "id": "fldumZe00w09RYTW6",
      "name": "Visited",
      "options": {
        "color": "redBright",
        "icon": "star"
      },
      "type": "checkbox"
    }
  ],
  "id": "tbltp8DGLhqbUmjK1",
  "name": "Apartments (revised)",
  "primaryFieldId": "fld1VnoyuotSTyxW1",
  "views": [
    {
      "id": "viwQpsuEDqHFqegkp",
      "name": "Grid view",
      "type": "grid"
    }
  ]
}
```
