跳转到主要内容
POST
/
base
/
{baseId}
/
table
Create table
curl --request POST \
  --url http://127.0.0.1:3000/api/base/{baseId}/table/ \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "dbTableName": "<string>",
  "description": "<string>",
  "icon": "<string>",
  "fields": [
    {
      "type": "singleSelect",
      "name": "<string>",
      "unique": true,
      "notNull": true,
      "dbFieldName": "<string>",
      "isLookup": true,
      "isConditionalLookup": true,
      "description": "this is a summary",
      "lookupOptions": {
        "foreignTableId": "<string>",
        "lookupFieldId": "<string>",
        "linkFieldId": "<string>",
        "filter": {}
      },
      "options": {
        "expression": "countall({values})",
        "timeZone": "<string>",
        "formatting": "<unknown>",
        "showAs": {
          "type": "url"
        }
      },
      "aiConfig": {
        "modelKey": "<string>",
        "type": "extraction",
        "sourceFieldId": "<string>",
        "isAutoFill": true,
        "attachPrompt": "<string>"
      },
      "id": "fldxxxxxxxxxxxxxxxx",
      "order": {
        "viewId": "<string>",
        "orderIndex": 123
      }
    }
  ],
  "views": [
    {
      "type": "grid",
      "name": "<string>",
      "description": "<string>",
      "order": 123,
      "options": {
        "rowHeight": "short",
        "fieldNameDisplayLines": 2,
        "frozenColumnCount": 1,
        "frozenFieldId": "<string>"
      },
      "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": {}
    }
  ],
  "records": [
    {
      "fields": {
        "single line text": "text value"
      }
    }
  ],
  "order": 123,
  "fieldKeyType": "name"
}
'
{
  "id": "<string>",
  "name": "<string>",
  "dbTableName": "<string>",
  "fields": [
    {
      "id": "<string>",
      "name": "Tags",
      "type": "singleSelect",
      "options": {
        "expression": "countall({values})",
        "timeZone": "<string>",
        "formatting": "<unknown>",
        "showAs": {
          "type": "url"
        }
      },
      "cellValueType": "string",
      "dbFieldType": "TEXT",
      "dbFieldName": "<string>",
      "description": "this is a summary",
      "meta": {
        "persistedAsGeneratedColumn": false
      },
      "aiConfig": {
        "modelKey": "<string>",
        "type": "extraction",
        "sourceFieldId": "<string>",
        "isAutoFill": true,
        "attachPrompt": "<string>"
      },
      "isLookup": true,
      "isConditionalLookup": true,
      "lookupOptions": {
        "relationship": "oneOne",
        "foreignTableId": "<string>",
        "lookupFieldId": "<string>",
        "fkHostTableName": "<string>",
        "selfKeyName": "<string>",
        "foreignKeyName": "<string>",
        "linkFieldId": "<string>",
        "baseId": "<string>",
        "filter": {}
      },
      "notNull": true,
      "unique": true,
      "isPrimary": true,
      "isComputed": true,
      "isPending": true,
      "hasError": true,
      "isMultipleCellValue": true,
      "recordRead": true,
      "recordCreate": true
    }
  ],
  "views": [
    {
      "id": "<string>",
      "name": "<string>",
      "type": "grid",
      "createdBy": "<string>",
      "createdTime": "<string>",
      "columnMeta": {},
      "description": "<string>",
      "order": 123,
      "options": {
        "rowHeight": "short",
        "fieldNameDisplayLines": 2,
        "frozenColumnCount": 1,
        "frozenFieldId": "<string>"
      },
      "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
        }
      },
      "lastModifiedBy": "<string>",
      "lastModifiedTime": "<string>",
      "pluginId": "<string>"
    }
  ],
  "records": [
    {
      "id": "<string>",
      "fields": {},
      "name": "<string>",
      "autoNumber": 123,
      "createdTime": "<string>",
      "lastModifiedTime": "<string>",
      "createdBy": "<string>",
      "lastModifiedBy": "<string>",
      "permissions": {},
      "undeletable": true
    }
  ],
  "description": "<string>",
  "icon": "<string>",
  "order": 123,
  "lastModifiedTime": "<string>",
  "defaultViewId": "<string>"
}

授权

Authorization
string
header
必填

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

路径参数

baseId
string
必填

请求体

application/json

params for create a table

name
string
Minimum string length: 1
dbTableName
string

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.

description
string | null

The description of the table.

icon
string<emoji> | null

The emoji icon string of the table.

fields
object[]

The fields of the table. If it is empty, 3 fields include SingleLineText, Number, SingleSelect will and 3 empty records be generated by default.

views
object[]

The views of the table. If it is empty, a grid view will be generated by default.

records
object[]

The record data of the table. If it is empty, 3 empty records will be generated by default.

示例:
[
{
"fields": { "single line text": "text value" }
}
]
order
number
fieldKeyType
enum<string>
默认值:name

Define the key type of record.fields[key], You can click "systemInfo" in the field edit box to get fieldId or enter the table design screen with all the field details

可用选项:
id,
name,
dbFieldName

响应

201 - application/json

Returns data about a table.

Complete table structure data and initial record data.

id
string
必填

The id of table.

name
string
必填

The name of the table.

dbTableName
string
必填

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.

fields
object[]
必填

The fields of the table.

views
object[]
必填

The views of the table.

records
object[]
必填

The records of the table.

description
string

The description of the table.

icon
string<emoji>

The emoji icon string of the table.

order
number
lastModifiedTime
string

The last modified time of the table.

defaultViewId
string

The default view id of the table.

Last modified on December 10, 2025