Quick Start
API List
- record
- space
- base
- view
- API Reference
- dashboard
- plugin
- attachments
- admin
- trash
- field
- aggregation
- table
- 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
field
Convert field type
Convert field to a different type with automatic type casting and symmetric field handling
PUT
/
table
/
{tableId}
/
field
/
{fieldId}
/
convert
curl --request PUT \
--url https://app.teable.cn/api/table/%7BtableId%7D/field/%7BfieldId%7D/convert \
--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"}},"aiConfig":{"modelKey":"string","isAutoFill":true,"attachPrompt":"string","type":"extraction","sourceFieldId":"string"}}'
{
"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
}
Authorizations
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Body
application/json
Provide the complete field configuration including all properties, modified or not
Response
200 - application/json
Returns field data after update.
The response is of type object
.
curl --request PUT \
--url https://app.teable.cn/api/table/%7BtableId%7D/field/%7BfieldId%7D/convert \
--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"}},"aiConfig":{"modelKey":"string","isAutoFill":true,"attachPrompt":"string","type":"extraction","sourceFieldId":"string"}}'
{
"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
}
Assistant
Responses are generated using AI and may contain mistakes.