> This page is for Glide Classic.

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://www.glideapps.com/docs/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://www.glideapps.com/docs/_mcp/server.

# Create Table

POST https://api.glideapps.com/tables
Content-Type: application/json

Create a new Big Table, define its structure, and (optionally) populate it with data.

Row IDs for any added rows are returned in the response in the same order as the input row data is passed in the request. Row data may be passed in JSON, CSV, or TSV format.

When using a CSV or TSV request body, the name of the table must be passed as a query parameter and the schema of the table is always inferred from the content. Alternatively, the CSV/TSV content may be [stashed](/docs/classic-api/stashing/introduction), and then the schema and name may be passed in the regular JSON payload.

If a schema is passed in the payload, any passed row data must match that schema. If a column is not included in the passed row data, it will be empty in the added row. If a column is passed that does not exist in the schema, or with a value that does not match the column's type, the default behavior is for the table to not be created and the API call to [return an error](/docs/classic-api/general/errors#invalid-row-data). However, you can control this behavior with the `onSchemaError` query parameter.

## Examples

If you want to create a table and populate it with an initial dataset, you can do so by providing the data inline in the `rows` field (being sure that row object structure matches the table schema):

```json
{
    "name": "Employees",
    "schema": { ... },
    "rows": [
        {
            "fullName": "Alex Bard",
            "ageInYears": 30,
            "hiredOn": "2021-07-03"
        }
    ]
}
```

However, this is only appropriate for relatively small initial datasets (around a few hundred rows or less, depending on schema complexity). If you need to work with a larger dataset you should utilize stashing.

[Stashing](/docs/classic-api/stashing/introduction) is our process for handling the upload of large datasets. Break down your dataset into smaller, more manageable, pieces and [upload them to a single stash ID](/docs/classic-api/stashing/stash-data).

Then, to create a table from a stash, you can use the `$stashID` reference in the `rows` field instead of providing the data inline:

```json
{
    "name": "Employees",
    "schema": { ... },
    "rows": {
        "$stashID": "20240215-job32"
    }
}
```

Reference: https://www.glideapps.com/docs/classic-api/tables/create-table

## Authentication

- `Authorization` header (bearer token, required) — Bearer authentication header of the form Bearer `<token>`, where `<token>` is your [auth token](/docs/api-reference/v2/general/authentication).

## Request

### Query parameters

- `name` (string, optional)
- `appsToLink` (list of string, optional)
- `onSchemaError` (enum, optional) — The action to take when the passed data does not match the table schema: - `abort`: Abort the entire operation and return an error. - `dropColumns`: Ignore the data that caused the error, and do not import those columns in the affected rows. - `updateSchema`: Update the schema as needed to add any missing columns or widen the data types of existing columns, and then import the data from them.
  - Allowed values: `abort`, `dropColumns`, `updateSchema`

### Headers

- `x-glide-asynchronous` (enum, optional) — Allow asynchronous processing, which will return a job ID. Note that this does not force asynchronouys processing. The caller must handle both synchronous and asynchronous responses.
  - Allowed values: `true`, `false`

### Body (application/json)

This endpoint expects a createTable_Request.

- `createTable_Request`
  - CreateTableRequest0
  - A_collection_of_row_objects: list of map from string to any

## Response

### 201

- `data` (TablesPostResponsesContentApplicationJsonSchemaData, required)

### 202

- `data` (TablesPostResponsesContentApplicationJsonSchemaData, required)

## Errors

### 400 Bad Request Error

- `error` (TablesPostResponsesContentApplicationJsonSchemaError, required)

### 402 Payment Required Error

- `error` (TablesPostResponsesContentApplicationJsonSchemaError, required)

### 422 Unprocessable Entity Error

- `error` (TablesPostResponsesContentApplicationJsonSchemaError, required)

## Types

### CreateTableRequest0

- `name` (string, required) — Name of the table, e.g., `Invoices`
- `rows` (TablesPostRequestBodyContentApplicationJsonSchemaOneOf0Rows, required)
- `schema` (TablesPostRequestBodyContentApplicationJsonSchemaOneOf0Schema, optional) — The schema of the table as a collection of column definitions. If this is not provided, the schema will be inferred from the data.
- `appsToLink` (list of string, optional) — An array of app IDs to link the new table to.

### TablesPostResponsesContentApplicationJsonSchemaData

- `tableID` (string, required) — ID of the table, e.g., `2a1bad8b-cf7c-44437-b8c1-e3782df6`
- `jobID` (string, required) — The ID of the asynchronous job

### TablesPostResponsesContentApplicationJsonSchemaError

- `type` (enum, required)
  - Allowed values: `column_id_reserved`, `column_id_not_unique`, `column_has_invalid_value`, `column_id_not_found`
- `message` (string, required)

### TablesPostRequestBodyContentApplicationJsonSchemaOneOf0Rows

- A_collection_of_row_objects: list of map from string to any
- TablesPostRequestBodyContentApplicationJsonSchemaOneOf0Rows1

### TablesPostRequestBodyContentApplicationJsonSchemaOneOf0Schema

The schema of the table as a collection of column definitions. If this is not provided, the schema will be inferred from the data.

- `columns` (list of TablesPostRequestBodyContentApplicationJsonSchemaOneOf0SchemaColumnsItems, required) — A collection of column definitions, in the order that they are to be displayed in the table.

### TablesPostRequestBodyContentApplicationJsonSchemaOneOf0Rows1

A single reference to a [stash](/docs/api-reference/v2/stashing) whose data should be used.

- `$stashID` (string, required) — ID of the stash, e.g., `20240215-job32`

### TablesPostRequestBodyContentApplicationJsonSchemaOneOf0SchemaColumnsItems

- `id` (string, required) — Internal ID of the column, e.g., `fullName`. This value cannot be changed once created.
- `type` (TablesPostRequestBodyContentApplicationJsonSchemaOneOf0SchemaColumnsItemsType, required) — The type of the column.
- `displayName` (string, optional) — Human-readable display name of the column, e.g., `Full Name`. Can be modified once created.

### TablesPostRequestBodyContentApplicationJsonSchemaOneOf0SchemaColumnsItemsType

The type of the column.

- enum
  - Allowed values: `string`, `uri`, `imageURI`, `audioURI`, `markdown`, `phoneNumber`, `emailAddress`, `emoji`, `date`, `time`, `dateTime`, `duration`, `number`, `boolean`, `json`
- TablesPostRequestBodyContentApplicationJsonSchemaOneOf0SchemaColumnsItemsType1

### TablesPostRequestBodyContentApplicationJsonSchemaOneOf0SchemaColumnsItemsType1

- TablesPostRequestBodyContentApplicationJsonSchemaOneOf0SchemaColumnsItemsType10
- TablesPostRequestBodyContentApplicationJsonSchemaOneOf0SchemaColumnsItemsType11

### TablesPostRequestBodyContentApplicationJsonSchemaOneOf0SchemaColumnsItemsType10

- `kind` (enum, required)
  - Allowed values: `string`, `uri`, `imageURI`, `audioURI`, `markdown`, `phoneNumber`, `emailAddress`, `emoji`, `date`, `time`, `dateTime`, `duration`, `number`, `boolean`, `json`

### TablesPostRequestBodyContentApplicationJsonSchemaOneOf0SchemaColumnsItemsType11

- `kind` (enum, required)
  - Allowed values: `array`
- `items` (TablesPostRequestBodyContentApplicationJsonSchemaOneOf0SchemaColumnsItemsTypeOneOf1OneOf1Items, required)

### TablesPostRequestBodyContentApplicationJsonSchemaOneOf0SchemaColumnsItemsTypeOneOf1OneOf1Items

- `kind` (enum, required)
  - Allowed values: `string`, `uri`, `imageURI`, `audioURI`, `markdown`, `phoneNumber`, `emailAddress`, `emoji`, `date`, `time`, `dateTime`, `duration`, `number`, `boolean`, `json`

## Examples

### Example 1

**Request**

```json
{
  "name": "Invoices",
  "rows": [
    {
      "amountPaid": 0,
      "fullName": "Alex Bard",
      "invoiceDate": "2024-07-29T14:04:15.561Z",
      "totalAmount": 34.5
    },
    {
      "amountPaid": 20,
      "fullName": "Alicia Hines",
      "invoiceDate": "2023-06-15T10:30:00.000Z",
      "totalAmount": 50.75
    }
  ]
}
```

**Response**

```json
{
  "data": {
    "tableID": "2a1bad8b-cf7c-44437-b8c1-e3782df6",
    "linkedAppIDs": [
      "string"
    ],
    "rowIDs": [
      "zcJWnyI8Tbam21V34K8MNA",
      "93a19-cf7c-44437-b8c1-e9acbbb"
    ]
  }
}
```

**SDK Code**

```python
import requests

url = "https://api.glideapps.com/tables"

payload = {
    "name": "Invoices",
    "rows": [
        {
            "amountPaid": 0,
            "fullName": "Alex Bard",
            "invoiceDate": "2024-07-29T14:04:15.561Z",
            "totalAmount": 34.5
        },
        {
            "amountPaid": 20,
            "fullName": "Alicia Hines",
            "invoiceDate": "2023-06-15T10:30:00.000Z",
            "totalAmount": 50.75
        }
    ]
}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript
const url = 'https://api.glideapps.com/tables';
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"name":"Invoices","rows":[{"amountPaid":0,"fullName":"Alex Bard","invoiceDate":"2024-07-29T14:04:15.561Z","totalAmount":34.5},{"amountPaid":20,"fullName":"Alicia Hines","invoiceDate":"2023-06-15T10:30:00.000Z","totalAmount":50.75}]}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.glideapps.com/tables"

	payload := strings.NewReader("{\n  \"name\": \"Invoices\",\n  \"rows\": [\n    {\n      \"amountPaid\": 0,\n      \"fullName\": \"Alex Bard\",\n      \"invoiceDate\": \"2024-07-29T14:04:15.561Z\",\n      \"totalAmount\": 34.5\n    },\n    {\n      \"amountPaid\": 20,\n      \"fullName\": \"Alicia Hines\",\n      \"invoiceDate\": \"2023-06-15T10:30:00.000Z\",\n      \"totalAmount\": 50.75\n    }\n  ]\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api.glideapps.com/tables")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"name\": \"Invoices\",\n  \"rows\": [\n    {\n      \"amountPaid\": 0,\n      \"fullName\": \"Alex Bard\",\n      \"invoiceDate\": \"2024-07-29T14:04:15.561Z\",\n      \"totalAmount\": 34.5\n    },\n    {\n      \"amountPaid\": 20,\n      \"fullName\": \"Alicia Hines\",\n      \"invoiceDate\": \"2023-06-15T10:30:00.000Z\",\n      \"totalAmount\": 50.75\n    }\n  ]\n}"

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.glideapps.com/tables")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"name\": \"Invoices\",\n  \"rows\": [\n    {\n      \"amountPaid\": 0,\n      \"fullName\": \"Alex Bard\",\n      \"invoiceDate\": \"2024-07-29T14:04:15.561Z\",\n      \"totalAmount\": 34.5\n    },\n    {\n      \"amountPaid\": 20,\n      \"fullName\": \"Alicia Hines\",\n      \"invoiceDate\": \"2023-06-15T10:30:00.000Z\",\n      \"totalAmount\": 50.75\n    }\n  ]\n}")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.glideapps.com/tables', [
  'body' => '{
  "name": "Invoices",
  "rows": [
    {
      "amountPaid": 0,
      "fullName": "Alex Bard",
      "invoiceDate": "2024-07-29T14:04:15.561Z",
      "totalAmount": 34.5
    },
    {
      "amountPaid": 20,
      "fullName": "Alicia Hines",
      "invoiceDate": "2023-06-15T10:30:00.000Z",
      "totalAmount": 50.75
    }
  ]
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://api.glideapps.com/tables");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"name\": \"Invoices\",\n  \"rows\": [\n    {\n      \"amountPaid\": 0,\n      \"fullName\": \"Alex Bard\",\n      \"invoiceDate\": \"2024-07-29T14:04:15.561Z\",\n      \"totalAmount\": 34.5\n    },\n    {\n      \"amountPaid\": 20,\n      \"fullName\": \"Alicia Hines\",\n      \"invoiceDate\": \"2023-06-15T10:30:00.000Z\",\n      \"totalAmount\": 50.75\n    }\n  ]\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = [
  "name": "Invoices",
  "rows": [
    [
      "amountPaid": 0,
      "fullName": "Alex Bard",
      "invoiceDate": "2024-07-29T14:04:15.561Z",
      "totalAmount": 34.5
    ],
    [
      "amountPaid": 20,
      "fullName": "Alicia Hines",
      "invoiceDate": "2023-06-15T10:30:00.000Z",
      "totalAmount": 50.75
    ]
  ]
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.glideapps.com/tables")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```

### Example 2

**Request**

```json
{
  "name": "Invoices",
  "rows": [
    {
      "amountPaid": 0,
      "fullName": "Alex Bard",
      "invoiceDate": "2024-07-29T14:04:15.561Z",
      "totalAmount": 34.5
    },
    {
      "amountPaid": 20,
      "fullName": "Alicia Hines",
      "invoiceDate": "2023-06-15T10:30:00.000Z",
      "totalAmount": 50.75
    }
  ]
}
```

**Response**

```json
{
  "data": {
    "tableID": "2a1bad8b-cf7c-44437-b8c1-e3782df6",
    "jobID": "string"
  }
}
```

**SDK Code**

```python
import requests

url = "https://api.glideapps.com/tables"

payload = {
    "name": "Invoices",
    "rows": [
        {
            "amountPaid": 0,
            "fullName": "Alex Bard",
            "invoiceDate": "2024-07-29T14:04:15.561Z",
            "totalAmount": 34.5
        },
        {
            "amountPaid": 20,
            "fullName": "Alicia Hines",
            "invoiceDate": "2023-06-15T10:30:00.000Z",
            "totalAmount": 50.75
        }
    ]
}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript
const url = 'https://api.glideapps.com/tables';
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"name":"Invoices","rows":[{"amountPaid":0,"fullName":"Alex Bard","invoiceDate":"2024-07-29T14:04:15.561Z","totalAmount":34.5},{"amountPaid":20,"fullName":"Alicia Hines","invoiceDate":"2023-06-15T10:30:00.000Z","totalAmount":50.75}]}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.glideapps.com/tables"

	payload := strings.NewReader("{\n  \"name\": \"Invoices\",\n  \"rows\": [\n    {\n      \"amountPaid\": 0,\n      \"fullName\": \"Alex Bard\",\n      \"invoiceDate\": \"2024-07-29T14:04:15.561Z\",\n      \"totalAmount\": 34.5\n    },\n    {\n      \"amountPaid\": 20,\n      \"fullName\": \"Alicia Hines\",\n      \"invoiceDate\": \"2023-06-15T10:30:00.000Z\",\n      \"totalAmount\": 50.75\n    }\n  ]\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api.glideapps.com/tables")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"name\": \"Invoices\",\n  \"rows\": [\n    {\n      \"amountPaid\": 0,\n      \"fullName\": \"Alex Bard\",\n      \"invoiceDate\": \"2024-07-29T14:04:15.561Z\",\n      \"totalAmount\": 34.5\n    },\n    {\n      \"amountPaid\": 20,\n      \"fullName\": \"Alicia Hines\",\n      \"invoiceDate\": \"2023-06-15T10:30:00.000Z\",\n      \"totalAmount\": 50.75\n    }\n  ]\n}"

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.glideapps.com/tables")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"name\": \"Invoices\",\n  \"rows\": [\n    {\n      \"amountPaid\": 0,\n      \"fullName\": \"Alex Bard\",\n      \"invoiceDate\": \"2024-07-29T14:04:15.561Z\",\n      \"totalAmount\": 34.5\n    },\n    {\n      \"amountPaid\": 20,\n      \"fullName\": \"Alicia Hines\",\n      \"invoiceDate\": \"2023-06-15T10:30:00.000Z\",\n      \"totalAmount\": 50.75\n    }\n  ]\n}")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.glideapps.com/tables', [
  'body' => '{
  "name": "Invoices",
  "rows": [
    {
      "amountPaid": 0,
      "fullName": "Alex Bard",
      "invoiceDate": "2024-07-29T14:04:15.561Z",
      "totalAmount": 34.5
    },
    {
      "amountPaid": 20,
      "fullName": "Alicia Hines",
      "invoiceDate": "2023-06-15T10:30:00.000Z",
      "totalAmount": 50.75
    }
  ]
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://api.glideapps.com/tables");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"name\": \"Invoices\",\n  \"rows\": [\n    {\n      \"amountPaid\": 0,\n      \"fullName\": \"Alex Bard\",\n      \"invoiceDate\": \"2024-07-29T14:04:15.561Z\",\n      \"totalAmount\": 34.5\n    },\n    {\n      \"amountPaid\": 20,\n      \"fullName\": \"Alicia Hines\",\n      \"invoiceDate\": \"2023-06-15T10:30:00.000Z\",\n      \"totalAmount\": 50.75\n    }\n  ]\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = [
  "name": "Invoices",
  "rows": [
    [
      "amountPaid": 0,
      "fullName": "Alex Bard",
      "invoiceDate": "2024-07-29T14:04:15.561Z",
      "totalAmount": 34.5
    ],
    [
      "amountPaid": 20,
      "fullName": "Alicia Hines",
      "invoiceDate": "2023-06-15T10:30:00.000Z",
      "totalAmount": 50.75
    ]
  ]
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.glideapps.com/tables")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```