Skip to main content

Create a Field

POST /fields
import requests

payload = {"name": "My Project"}
r = requests.request(
method="POST",
url="/projects",
headers={
"Authorization": "Bearer <YOUR_API_TOKEN>",
"Host": "api.lytecms.com"
},
json=payload,
)

Parameters

{
"table": "tbl_U3qFJJ5rbGA38xDeLjD3jrU3",
"name": "Text Field",
"type": "text"
}
ParameterTypeRequiredDescription
tablestringYesID of the table
namestringYesName of the field
typestringYesType of the field
The type field can be one of the following:
  • text
  • article
  • number
  • singleSelect
  • multipleSelects
  • checkbox
  • image
  • links
  • 🚧 (WIP) rating
  • 🚧 (WIP) slug
  • 🚧 (WIP) datetime
  • 🚧 (WIP) created_time
  • 🚧 (WIP) updated_time

Response

{
"id": "fld_SccxzCIFSyLeD4RVpennsQLr",
"name": "test table",
"type": "text",
"create_time": 1707029392,
"update_time": 1707029392
}