cURL
curl --request POST \
--url https://app.teable.ai/api/import/%7BbaseId%7D \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
--header 'content-type: application/json' \
--data '{"worksheets":{"property1":{"name":"string","columns":[{"type":"singleLineText","name":"string","sourceColumnIndex":0}],"useFirstRowAsHeader":true,"importData":true},"property2":{"name":"string","columns":[{"type":"singleLineText","name":"string","sourceColumnIndex":0}],"useFirstRowAsHeader":true,"importData":true}},"attachmentUrl":"string","fileType":"csv","notification":true,"tz":"string"}'const url = 'https://app.teable.ai/api/import/%7BbaseId%7D';
const options = {
method: 'POST',
headers: {
Authorization: 'Bearer REPLACE_BEARER_TOKEN',
'content-type': 'application/json'
},
body: '{"worksheets":{"property1":{"name":"string","columns":[{"type":"singleLineText","name":"string","sourceColumnIndex":0}],"useFirstRowAsHeader":true,"importData":true},"property2":{"name":"string","columns":[{"type":"singleLineText","name":"string","sourceColumnIndex":0}],"useFirstRowAsHeader":true,"importData":true}},"attachmentUrl":"string","fileType":"csv","notification":true,"tz":"string"}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}const http = require('https');
const options = {
method: 'POST',
hostname: 'app.teable.ai',
port: null,
path: '/api/import/%7BbaseId%7D',
headers: {
Authorization: 'Bearer REPLACE_BEARER_TOKEN',
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
worksheets: {
property1: {
name: 'string',
columns: [{type: 'singleLineText', name: 'string', sourceColumnIndex: 0}],
useFirstRowAsHeader: true,
importData: true
},
property2: {
name: 'string',
columns: [{type: 'singleLineText', name: 'string', sourceColumnIndex: 0}],
useFirstRowAsHeader: true,
importData: true
}
},
attachmentUrl: 'string',
fileType: 'csv',
notification: true,
tz: 'string'
}));
req.end();import http.client
conn = http.client.HTTPSConnection("app.teable.ai")
payload = "{\"worksheets\":{\"property1\":{\"name\":\"string\",\"columns\":[{\"type\":\"singleLineText\",\"name\":\"string\",\"sourceColumnIndex\":0}],\"useFirstRowAsHeader\":true,\"importData\":true},\"property2\":{\"name\":\"string\",\"columns\":[{\"type\":\"singleLineText\",\"name\":\"string\",\"sourceColumnIndex\":0}],\"useFirstRowAsHeader\":true,\"importData\":true}},\"attachmentUrl\":\"string\",\"fileType\":\"csv\",\"notification\":true,\"tz\":\"string\"}"
headers = {
'Authorization': "Bearer REPLACE_BEARER_TOKEN",
'content-type': "application/json"
}
conn.request("POST", "/api/import/%7BbaseId%7D", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.teable.ai/api/import/{baseId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'worksheets' => [
],
'attachmentUrl' => '<string>',
'tz' => '<string>',
'notification' => true
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.teable.ai/api/import/{baseId}"
payload := strings.NewReader("{\n \"worksheets\": {},\n \"attachmentUrl\": \"<string>\",\n \"tz\": \"<string>\",\n \"notification\": true\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(string(body))
}HttpResponse<String> response = Unirest.post("https://app.teable.ai/api/import/{baseId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"worksheets\": {},\n \"attachmentUrl\": \"<string>\",\n \"tz\": \"<string>\",\n \"notification\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.teable.ai/api/import/{baseId}")
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 \"worksheets\": {},\n \"attachmentUrl\": \"<string>\",\n \"tz\": \"<string>\",\n \"notification\": true\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"name": "<string>",
"dbTableName": "<string>",
"description": "<string>",
"icon": "<string>",
"order": 123,
"lastModifiedTime": "<string>",
"defaultViewId": "<string>"
}import
Post import
create table from file
POST
/
import
/
{baseId}
cURL
curl --request POST \
--url https://app.teable.ai/api/import/%7BbaseId%7D \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
--header 'content-type: application/json' \
--data '{"worksheets":{"property1":{"name":"string","columns":[{"type":"singleLineText","name":"string","sourceColumnIndex":0}],"useFirstRowAsHeader":true,"importData":true},"property2":{"name":"string","columns":[{"type":"singleLineText","name":"string","sourceColumnIndex":0}],"useFirstRowAsHeader":true,"importData":true}},"attachmentUrl":"string","fileType":"csv","notification":true,"tz":"string"}'const url = 'https://app.teable.ai/api/import/%7BbaseId%7D';
const options = {
method: 'POST',
headers: {
Authorization: 'Bearer REPLACE_BEARER_TOKEN',
'content-type': 'application/json'
},
body: '{"worksheets":{"property1":{"name":"string","columns":[{"type":"singleLineText","name":"string","sourceColumnIndex":0}],"useFirstRowAsHeader":true,"importData":true},"property2":{"name":"string","columns":[{"type":"singleLineText","name":"string","sourceColumnIndex":0}],"useFirstRowAsHeader":true,"importData":true}},"attachmentUrl":"string","fileType":"csv","notification":true,"tz":"string"}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}const http = require('https');
const options = {
method: 'POST',
hostname: 'app.teable.ai',
port: null,
path: '/api/import/%7BbaseId%7D',
headers: {
Authorization: 'Bearer REPLACE_BEARER_TOKEN',
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
worksheets: {
property1: {
name: 'string',
columns: [{type: 'singleLineText', name: 'string', sourceColumnIndex: 0}],
useFirstRowAsHeader: true,
importData: true
},
property2: {
name: 'string',
columns: [{type: 'singleLineText', name: 'string', sourceColumnIndex: 0}],
useFirstRowAsHeader: true,
importData: true
}
},
attachmentUrl: 'string',
fileType: 'csv',
notification: true,
tz: 'string'
}));
req.end();import http.client
conn = http.client.HTTPSConnection("app.teable.ai")
payload = "{\"worksheets\":{\"property1\":{\"name\":\"string\",\"columns\":[{\"type\":\"singleLineText\",\"name\":\"string\",\"sourceColumnIndex\":0}],\"useFirstRowAsHeader\":true,\"importData\":true},\"property2\":{\"name\":\"string\",\"columns\":[{\"type\":\"singleLineText\",\"name\":\"string\",\"sourceColumnIndex\":0}],\"useFirstRowAsHeader\":true,\"importData\":true}},\"attachmentUrl\":\"string\",\"fileType\":\"csv\",\"notification\":true,\"tz\":\"string\"}"
headers = {
'Authorization': "Bearer REPLACE_BEARER_TOKEN",
'content-type': "application/json"
}
conn.request("POST", "/api/import/%7BbaseId%7D", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.teable.ai/api/import/{baseId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'worksheets' => [
],
'attachmentUrl' => '<string>',
'tz' => '<string>',
'notification' => true
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.teable.ai/api/import/{baseId}"
payload := strings.NewReader("{\n \"worksheets\": {},\n \"attachmentUrl\": \"<string>\",\n \"tz\": \"<string>\",\n \"notification\": true\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(string(body))
}HttpResponse<String> response = Unirest.post("https://app.teable.ai/api/import/{baseId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"worksheets\": {},\n \"attachmentUrl\": \"<string>\",\n \"tz\": \"<string>\",\n \"notification\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.teable.ai/api/import/{baseId}")
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 \"worksheets\": {},\n \"attachmentUrl\": \"<string>\",\n \"tz\": \"<string>\",\n \"notification\": true\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"name": "<string>",
"dbTableName": "<string>",
"description": "<string>",
"icon": "<string>",
"order": 123,
"lastModifiedTime": "<string>",
"defaultViewId": "<string>"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Body
application/json
Response
201 - application/json
Returns data about a table without records
The id of table.
The name of the table.
Table name in backend database. Limitation: 1-63 characters, start with letter, can only contain letters, numbers and underscore, case insensitive, cannot be duplicated with existing db table name in the base.
Pattern:
^[a-z]\w{0,62}$/iThe description of the table.
The emoji icon string of the table.
The last modified time of the table.
The default view id of the table.
Last modified on March 5, 2026
Was this page helpful?
⌘I

