POST
/
table
/
{tableId}
/
field
/
plan
curl --request POST \
  --url https://app.teable.io/api/table/%7BtableId%7D/field/plan \
  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
  --header 'content-type: application/json' \
  --data '{"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"}},"id":"fldxxxxxxxxxxxxxxxx","order":{"viewId":"string","orderIndex":0}}'
{
  "estimateTime": 123,
  "graph": {
    "nodes": [
      {
        "id": "<string>",
        "label": "<string>",
        "comboId": "<string>"
      }
    ],
    "edges": [
      {
        "source": "<string>",
        "target": "<string>",
        "label": "<string>"
      }
    ],
    "combos": [
      {
        "id": "<string>",
        "label": "<string>"
      }
    ]
  },
  "updateCellCount": 123
}

Authorizations

Authorization
string
header
required

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

Path Parameters

tableId
string
required

Body

application/json
type
enum<string>
required

The field types supported by teable.

Available options:
singleLineText,
longText,
user,
attachment,
checkbox,
multipleSelect,
singleSelect,
date,
number,
duration,
rating,
formula,
rollup,
count,
link,
createdTime,
lastModifiedTime,
createdBy,
lastModifiedBy,
autoNumber,
button
name
string

The name of the field. can not be duplicated in the table.

Minimum length: 1
unique
boolean

Whether this field is not unique.

notNull
boolean

Whether this field is not null.

dbFieldName
string

Field(column) name in backend database. Limitation: 1-63 characters, can only contain letters, numbers and underscore, case sensitive, cannot be duplicated with existing db field name in the table.

Minimum length: 1
isLookup
boolean

Whether this field is lookup field. witch means cellValue and [fieldType] is looked up from the linked table.

description
string | null

The description of the field.

lookupOptions
object

The lookup options for field, you need to configure it when isLookup attribute is true or field type is rollup.

options
object

The options of the field. The configuration of the field's options depend on the it's specific type.

id
string

The id of the field that start with "fld", followed by exactly 16 alphanumeric characters /^fld[\da-zA-Z]{16}$/. It is sometimes useful to specify an id at creation time

order
object

Response

201 - application/json
Returns the calculation plan for creating the field
estimateTime
number
required
updateCellCount
number
required
graph
object