API 列表
- record
- space
- base
- view
- API Reference
- dashboard
- plugin
- attachments
- admin
- trash
- field
- aggregation
- table
- POSTCreate table
- GETGet table details
- DELDelete table
- GETList tables
- DELPermanently delete table
- PUTUpdate table name
- PUTUpdate table tcon
- PUTUpdate table order
- PUTUpdate table description
- PUTUpdate db table name
- GETGet default view id
- GETGet table permissions
- POSTToggle table index
- POSTGet activated index
- GETGet abnormal indexes
- PATCHRepair table index
- POSTDuplicate a table
- POST
- selection
- plan
- user
- auth
- db-connection
- invitation
- share
- notification
- access-token
- import
- export
- pin
- billing
- usage
- oauth
- comment
- organization
- ai
- integrity
- plugin-panel
- plugin-context-menu
- template
- chat
- automation
- authority-matrix
- enterprise
- space-manage
table
Create table
Create a new table in the specified base with customizable fields, views, and initial records. Default configurations will be applied if not specified.
POST
/
base
/
{baseId}
/
table
/
curl --request POST \
--url https://app.teable.cn/api/base/%7BbaseId%7D/table/ \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
--header 'content-type: application/json' \
--data '{"name":"string","dbTableName":"string","description":"string","icon":"string","fields":[{"type":"singleSelect","name":"Tags","unique":true,"notNull":true,"dbFieldName":"string","isLookup":true,"description":"this is a summary","lookupOptions":{"foreignTableId":"string","lookupFieldId":"string","linkFieldId":"string","filter":{}},"options":{"expression":"countall({values})","timeZone":"string","formatting":{"date":"string","time":"HH:mm","timeZone":"string"},"showAs":{"type":"url"}},"aiConfig":{"modelKey":"string","isAutoFill":true,"attachPrompt":"string","type":"extraction","sourceFieldId":"string"},"id":"fldxxxxxxxxxxxxxxxx","order":{"viewId":"string","orderIndex":0}}],"views":[{"name":"string","type":"grid","description":"string","order":0,"options":{"rowHeight":"short","fieldNameDisplayLines":1,"frozenColumnCount":0},"sort":{"sortObjs":[{"fieldId":"string","order":"asc"}],"manualSort":true},"filter":{},"group":[{"fieldId":"string","order":"asc"}],"isLocked":true,"shareId":"string","enableShare":true,"shareMeta":{"allowCopy":true,"includeHiddenField":true,"password":"string","includeRecords":true,"submit":{"allow":true,"requireLogin":true}},"columnMeta":{"property1":{"order":0,"width":0,"hidden":true,"statisticFunc":"count"},"property2":{"order":0,"width":0,"hidden":true,"statisticFunc":"count"}}}],"records":[{"fields":{"single line text":"text value"}}],"order":0,"fieldKeyType":"id"}'
{
"id": "<string>",
"name": "<string>",
"dbTableName": "<string>",
"description": "<string>",
"icon": "<string>",
"fields": [
{
"id": "<string>",
"name": "Tags",
"type": "singleSelect",
"description": "this is a summary",
"options": {
"expression": "countall({values})",
"timeZone": "<string>",
"formatting": {
"date": "<string>",
"time": "HH:mm",
"timeZone": "<string>"
},
"showAs": {
"type": "url"
}
},
"aiConfig": {
"modelKey": "<string>",
"isAutoFill": true,
"attachPrompt": "<string>",
"type": "extraction",
"sourceFieldId": "<string>"
},
"isLookup": true,
"lookupOptions": {
"foreignTableId": "<string>",
"lookupFieldId": "<string>",
"relationship": "oneOne",
"fkHostTableName": "<string>",
"selfKeyName": "<string>",
"foreignKeyName": "<string>",
"filter": {},
"linkFieldId": "<string>"
},
"notNull": true,
"unique": true,
"isPrimary": true,
"isComputed": true,
"isPending": true,
"hasError": true,
"cellValueType": "string",
"isMultipleCellValue": true,
"dbFieldType": "TEXT",
"dbFieldName": "<string>",
"recordRead": true,
"recordCreate": true
}
],
"views": [
{
"id": "<string>",
"name": "<string>",
"type": "grid",
"description": "<string>",
"order": 123,
"options": {
"rowHeight": "short",
"fieldNameDisplayLines": 2,
"frozenColumnCount": 1
},
"sort": {
"sortObjs": [
{
"fieldId": "<string>",
"order": "asc"
}
],
"manualSort": true
},
"filter": {},
"group": [
{
"fieldId": "<string>",
"order": "asc"
}
],
"isLocked": true,
"shareId": "<string>",
"enableShare": true,
"shareMeta": {
"allowCopy": true,
"includeHiddenField": true,
"password": "<string>",
"includeRecords": true,
"submit": {
"allow": true,
"requireLogin": true
}
},
"createdBy": "<string>",
"lastModifiedBy": "<string>",
"createdTime": "<string>",
"lastModifiedTime": "<string>",
"columnMeta": {},
"pluginId": "<string>"
}
],
"records": [
{
"id": "<string>",
"name": "<string>",
"fields": {},
"autoNumber": 123,
"createdTime": "<string>",
"lastModifiedTime": "<string>",
"createdBy": "<string>",
"lastModifiedBy": "<string>",
"permissions": {},
"undeletable": true
}
],
"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
params for create a table
Response
201 - application/json
Returns data about a table.
Complete table structure data and initial record data.
curl --request POST \
--url https://app.teable.cn/api/base/%7BbaseId%7D/table/ \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
--header 'content-type: application/json' \
--data '{"name":"string","dbTableName":"string","description":"string","icon":"string","fields":[{"type":"singleSelect","name":"Tags","unique":true,"notNull":true,"dbFieldName":"string","isLookup":true,"description":"this is a summary","lookupOptions":{"foreignTableId":"string","lookupFieldId":"string","linkFieldId":"string","filter":{}},"options":{"expression":"countall({values})","timeZone":"string","formatting":{"date":"string","time":"HH:mm","timeZone":"string"},"showAs":{"type":"url"}},"aiConfig":{"modelKey":"string","isAutoFill":true,"attachPrompt":"string","type":"extraction","sourceFieldId":"string"},"id":"fldxxxxxxxxxxxxxxxx","order":{"viewId":"string","orderIndex":0}}],"views":[{"name":"string","type":"grid","description":"string","order":0,"options":{"rowHeight":"short","fieldNameDisplayLines":1,"frozenColumnCount":0},"sort":{"sortObjs":[{"fieldId":"string","order":"asc"}],"manualSort":true},"filter":{},"group":[{"fieldId":"string","order":"asc"}],"isLocked":true,"shareId":"string","enableShare":true,"shareMeta":{"allowCopy":true,"includeHiddenField":true,"password":"string","includeRecords":true,"submit":{"allow":true,"requireLogin":true}},"columnMeta":{"property1":{"order":0,"width":0,"hidden":true,"statisticFunc":"count"},"property2":{"order":0,"width":0,"hidden":true,"statisticFunc":"count"}}}],"records":[{"fields":{"single line text":"text value"}}],"order":0,"fieldKeyType":"id"}'
{
"id": "<string>",
"name": "<string>",
"dbTableName": "<string>",
"description": "<string>",
"icon": "<string>",
"fields": [
{
"id": "<string>",
"name": "Tags",
"type": "singleSelect",
"description": "this is a summary",
"options": {
"expression": "countall({values})",
"timeZone": "<string>",
"formatting": {
"date": "<string>",
"time": "HH:mm",
"timeZone": "<string>"
},
"showAs": {
"type": "url"
}
},
"aiConfig": {
"modelKey": "<string>",
"isAutoFill": true,
"attachPrompt": "<string>",
"type": "extraction",
"sourceFieldId": "<string>"
},
"isLookup": true,
"lookupOptions": {
"foreignTableId": "<string>",
"lookupFieldId": "<string>",
"relationship": "oneOne",
"fkHostTableName": "<string>",
"selfKeyName": "<string>",
"foreignKeyName": "<string>",
"filter": {},
"linkFieldId": "<string>"
},
"notNull": true,
"unique": true,
"isPrimary": true,
"isComputed": true,
"isPending": true,
"hasError": true,
"cellValueType": "string",
"isMultipleCellValue": true,
"dbFieldType": "TEXT",
"dbFieldName": "<string>",
"recordRead": true,
"recordCreate": true
}
],
"views": [
{
"id": "<string>",
"name": "<string>",
"type": "grid",
"description": "<string>",
"order": 123,
"options": {
"rowHeight": "short",
"fieldNameDisplayLines": 2,
"frozenColumnCount": 1
},
"sort": {
"sortObjs": [
{
"fieldId": "<string>",
"order": "asc"
}
],
"manualSort": true
},
"filter": {},
"group": [
{
"fieldId": "<string>",
"order": "asc"
}
],
"isLocked": true,
"shareId": "<string>",
"enableShare": true,
"shareMeta": {
"allowCopy": true,
"includeHiddenField": true,
"password": "<string>",
"includeRecords": true,
"submit": {
"allow": true,
"requireLogin": true
}
},
"createdBy": "<string>",
"lastModifiedBy": "<string>",
"createdTime": "<string>",
"lastModifiedTime": "<string>",
"columnMeta": {},
"pluginId": "<string>"
}
],
"records": [
{
"id": "<string>",
"name": "<string>",
"fields": {},
"autoNumber": 123,
"createdTime": "<string>",
"lastModifiedTime": "<string>",
"createdBy": "<string>",
"lastModifiedBy": "<string>",
"permissions": {},
"undeletable": true
}
],
"order": 123,
"lastModifiedTime": "<string>",
"defaultViewId": "<string>"
}
助手
Responses are generated using AI and may contain mistakes.