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

Authorization
string
header
required

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

Path Parameters

baseId
string
required

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.