跳转到主要内容
POST
/
table
/
{tableId}
/
field
/
{fieldId}
/
duplicate
Duplicate field
curl --request POST \
  --url http://127.0.0.1:3000/api/table/{tableId}/field/{fieldId}/duplicate \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "viewId": "<string>"
}
'
{
  "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
}

授权

Authorization
string
header
必填

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

路径参数

tableId
string
必填
fieldId
string
必填

请求体

application/json
name
string
必填
viewId
string

响应

201 - application/json

Returns duplicated field data

id
string
必填

The id of the field.

name
string
必填

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

示例:

"Tags"

type
enum<string>
必填

The field types supported by teable.

可用选项:
singleLineText,
longText,
user,
attachment,
checkbox,
multipleSelect,
singleSelect,
date,
number,
rating,
formula,
rollup,
conditionalRollup,
link,
createdTime,
lastModifiedTime,
createdBy,
lastModifiedBy,
autoNumber,
button
示例:

"singleSelect"

options
object
必填

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

cellValueType
enum<string>
必填

The cell value type of the field.

可用选项:
string,
number,
boolean,
dateTime
dbFieldType
enum<string>
必填

The field type of database that cellValue really store.

可用选项:
TEXT,
INTEGER,
DATETIME,
REAL,
BLOB,
JSON,
BOOLEAN
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 string length: 1
description
string

The description of the field.

示例:

"this is a summary"

meta
object

The metadata of the field. The structure of the field's meta depend on the field's type. Currently formula and link fields have meta.

aiConfig

The AI configuration of the field.

isLookup
boolean

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

isConditionalLookup
boolean

Whether this lookup field applies a conditional filter when resolving linked records.

lookupOptions
object

field lookup options.

notNull
boolean

Whether this field is not null.

unique
boolean

Whether this field is not unique.

isPrimary
boolean

Whether this field is primary field.

isComputed
boolean

Whether this field is computed field, you can not modify cellValue in computed field.

isPending
boolean

Whether this field's calculation is pending.

hasError
boolean

Whether This field has a configuration error. Check the fields referenced by this field's formula or configuration.

isMultipleCellValue
boolean

Whether this field has multiple cell value.

recordRead
boolean

Field record read permission. When set to false, reading records is denied. When true or not set, reading records is allowed.

recordCreate
boolean

Field record create permission. When set to false, creating records is denied. When true or not set, creating records is allowed.

Last modified on December 10, 2025