# Create table

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

Creates a new table and returns the schema for the newly created table.

Refer to [field types](https://airtable.com/developers/web/api/model/field-type.md) for supported field types, the write format for field options, and other specifics for certain field types. Supported field types have a write format shown.

At least one field must be specified. The first field in the fields array will be used as the table's primary field and must be a supported primary field type. Fields must have case-insensitive unique names within the table.

A default grid view will be created with all fields visible.

## 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`

## Request body

- `name: string` — required

  The name for the table.

- `description: string` — optional

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

- `fields` — array<[Field Config](https://airtable.com/developers/web/api/field-model.md)> — required

  A list of JSON objects representing the fields in the table. Refer to [field types](https://airtable.com/developers/web/api/model/field-type.md)
  for supported field types, the write format for field options, and other specifics
  for certain field types.

## Response format

Returns `Table-model`:

- `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 POST "https://api.airtable.com/v0/meta/bases/{baseId}/tables" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
--data '{
    "description": "A to-do list of places to visit",
    "fields": [
      {
        "description": "Name of the apartment",
        "name": "Name",
        "type": "singleLineText"
      },
      {
        "name": "Address",
        "type": "singleLineText"
      },
      {
        "name": "Visited",
        "options": {
          "color": "greenBright",
          "icon": "check"
        },
        "type": "checkbox"
      }
    ],
    "name": "Apartments"
  }'
```

```json
{
  "description": "A to-do list of places to visit",
  "fields": [
    {
      "description": "Name of the apartment",
      "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",
  "primaryFieldId": "fld1VnoyuotSTyxW1",
  "views": [
    {
      "id": "viwQpsuEDqHFqegkp",
      "name": "Grid view",
      "type": "grid"
    }
  ]
}
```
